[ESP-ENG] Titulos y enlaces en pimylifeup || Titles and links in pimylifeup
sites·@pynomiems·
0.000 HBD[ESP-ENG] Titulos y enlaces en pimylifeup || Titles and links in pimylifeup
<center> https://i.ibb.co/cwSyQZP/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) pimylifeup=client.get(f'https://pimylifeup.com/category/projects/page/{index}/').text for get_hl in HTMLParser(pimylifeup).css('header.entry-header > a'): print(f'headlines: {get_hl.text(strip=True)} links: {get_hl.attributes["href"]}') </pre> </div> <center> https://i.ibb.co/4MC793z/Result.png </center> https://i.ibb.co/JsK8Swk/Result-II.png <center>