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

in #sites2 years ago

Imagen diseñada con canva || Image designed with canva

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 idx in range(1,5):

client=httpx.Client()
advaitabio=client.get(f'https://advaitabio.com/news/page/{idx}/',headers=headers).text

advaitabio_html=HTMLParser(advaitabio)

for hl in advaitabio_html.css('div.fusion-post-content.post-content > h2 > a'):
   
    h=hl.text(strip=True)
    l=hl.attributes['href']
    
    print(f'Headlines: {h} Links:{l}')


Text translated by DeepL

Sort:  

Congratulations @pynomiems! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You have been a buzzy bee and published a post every day of the week.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Check out our last posts:

Our Hive Power Delegations to the December PUM Winners
Feedback from the January Hive Power Up Day
Hive Power Up Month Challenge 2022-12 - Winners List
The Hive Gamification Proposal Renewal
Support the HiveBuzz project. Vote for our proposal!