[ESP-ENG] Titulos y enlaces en techfeeddata || Titles and links in techfeeddata

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@pynomiems·
0.000 HBD
[ESP-ENG] Titulos y enlaces en techfeeddata || Titles and links in techfeeddata
<center>
https://i.ibb.co/XVjdZv9/Preview.png<center>Imagen diseñada con <a href="https://www.canva.com/">canva</a> || Image designed with <a href="https://www.canva.com/">canva</a></sub>
</center>

</center>

<div class="text-justify">

<pre>

import httpx
from selectolax.parser import HTMLParser

headers={'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 Edg/87.0.664.75'}

for index in range(1,5):
    
    client=httpx.Client(headers=headers,follow_redirects=True)
    techfeeddata=client.get(f'https://techfeeddata.com/page/{index}/').text
    
    techfeeddata_html=HTMLParser(techfeeddata)

    for hl in techfeeddata_html.css('h2.entry-title > a'):
        
        h=hl.text()
        l=hl.attributes['href']
        
        print(f'headlines: {h} links: {l}')

</pre>
    
</div>
    
<center>
    
https://i.ibb.co/tmkdJC6/Result.png

</center>

https://i.ibb.co/9TGz8Td/Result-II.png

<center>
    
👍 , , , , , , , , , , , , , , , , , , , , , ,