[ESP-ENG] Titulos y enlaces en itpreneurs || Titles and links in itpreneurs
sites·@pynomiems·
0.000 HBD[ESP-ENG] Titulos y enlaces en itpreneurs || Titles and links in itpreneurs
<center> https://i.ibb.co/WxJ6vhm/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> <div class="text-justify"> <pre> import asyncio import aiohttp from selectolax.parser import HTMLParser headers={'user-agent': 'Mozilla/5.0 (Linux; Android 10; motorola one macro Build/QMDS30.47-33-5; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/88.0.4324.181 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/376.0.0.12.108;]'} async def parsing_page(): async with aiohttp.ClientSession() as session: for index in range(2,6): async with session.get(f'https://www.itpreneurs.com/blog/page/{index}/',headers=headers) as page: itpreneurs=await page.text() itpreneurs_html=HTMLParser(itpreneurs) for get_hl in itpreneurs_html.css('div > h2 > a'): h=get_hl.text(strip=True) l=get_hl.attributes['href'] print(f'headlines: {h} links: {l}') asyncio.run(parsing_page()) </pre> </div> <center> https://i.ibb.co/KKV1jgp/Result.png </center> <center> https://i.ibb.co/9N144ss/Result-II.png </center> --- <center> ## Text translated by <a href="https://www.deepl.com/es/translator">DeepL</a> </center>
👍 team, thranax, ebersaubot1, egistar, pessal, lalupita, pastzam, hivebuzz, lizanomadsoul, manncpt, jnmarteau, globalschool, schmidi, mammasitta, raphaelle, fengchao, steemitboard, marivic10, arcange, joeyarnoldvn, achimmertens, shainemata, laruche, fatman, walterjay, pboulet, louis00334, ykretz, sagarkothari88, nautilus-up, life-timer,