create account

[ESP-ENG] Titulos y enlaces en techguide || Titles and links in techguide by pynomiems

View this thread on: hive.blogpeakd.comecency.com
· @pynomiems ·
$6.05
[ESP-ENG] Titulos y enlaces en techguide || Titles and links in techguide
<center>

![Preview.png](https://files.peakd.com/file/peakd-hive/pynomiems/AKJ3tAFWpG53cNGo3aLVDXmUt33uA5Tsvu2bj13W1famkPuh9y5Lsdi5Uc9coEq.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">

Bienvenido a esta nueva entrega querido lector de mi blog. En esta oportunidad traigo para ti un nuevo script elaborado con el lenguaje de programación Python y que podrás usarlo para obtener los títulos y enlaces del sitio web [techguide](https://www.techguide.com.au).

**techguide** es un portal del internet que se caracteriza por mantener informado a sus usuarios sobre las innovaciones tecnológicas más recientes. Incluye noticias, pruebas o revisiones de hardware,software, gadgets y autos. Mayormente, publica contenido relacionado sobre smartphones.

Es un sitio web simple y creo que fue concebido para el público general o para usuarios menos experimentados que gustan realizar lecturas rápidas. No te recomendaría este sitio web por si gustas lecturas más técnicas o detalladas sobre pruebas de hardware. Aun así, considero que vale la pena tomar en cuenta que puede resultar útil para cuando dispongamos poco tiempo y queremos saber sobre la actualidad tecnológica.

En fin, espero que esta publicación sea de su agrado. También puede dejar comentarios y estaré atento en responder.

Gracias por su visita. Espero que vuelva pronto.

**Este script fue ejecutado con Python 3.9.13 en el sistema operativo Lubuntu 18.0.4.**

<blockquote>

Welcome to this new installment dear reader of my blog. This time I bring you a new script made with the Python programming language and you can use it to get the titles and links of the website [techguide](https://www.techguide.com.au).

**techguide** is an Internet portal that is characterized by keeping its users informed about the latest technological innovations. It includes news, tests or reviews of hardware, software, gadgets and cars. Mostly, it publishes content related to smartphones.

It is a simple website and I think it was conceived for the general public or for less experienced users who like to make quick reads. I wouldn't recommend this website if you like more technical or detailed readings about hardware testing. Even so, I think it is worth taking into account that it can be useful for when you are short on time and want to know about the latest technological news.

Anyway, I hope you enjoy this publication. You can also leave comments and I will be attentive to respond.

Thanks for your visit. I hope you come back soon.

**This script was run with Python 3.9.13 on the Lubuntu 18.0.4 operating system.**

</blockquote>

<div>

<div class="text-justify">

<pre>

import asyncio
import aiohttp
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'}

async def parsing_page():
    
    async with aiohttp.ClientSession() as session:

        for index_pages in range(1,6): 
            
            async with session.get(f'https://www.techguide.com.au/news/page/{index_pages}/',headers=headers) as page:
                
                techguide = await page.text() 
                techguide_page = HTMLParser(techguide)
                 
                for hl in techguide_page.css('div > h2 > a'):

                    titles=hl.text(strip=True)
                    links=hl.attributes['href']
    
                    print(f'headlines: {titles} links: {links}')

asyncio.run(parsing_page())

</pre>

</div>

<center>

![result.png](https://files.peakd.com/file/peakd-hive/pynomiems/23t76kXDD5cbw2jmtpNciCdC3GcPJr5hP1qtYmxSpzJySiVxSQbjnC21sBau62atuHGto.png)

</center>

---

<center>

## Text translated by <a href="https://www.deepl.com/es/translator">DeepL</a>

</center>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorpynomiems
permlinkesp-eng-titulos-y-enlaces-en-techguide-oror-titles-and-links-in-techguide
categoryhive-148441
json_metadata{"app":"peakd/2022.07.1","format":"markdown","tags":["development","news","tech","reviews"],"users":[],"image":["https://files.peakd.com/file/peakd-hive/pynomiems/AKJ3tAFWpG53cNGo3aLVDXmUt33uA5Tsvu2bj13W1famkPuh9y5Lsdi5Uc9coEq.png","https://files.peakd.com/file/peakd-hive/pynomiems/23t76kXDD5cbw2jmtpNciCdC3GcPJr5hP1qtYmxSpzJySiVxSQbjnC21sBau62atuHGto.png"]}
created2022-08-13 12:04:33
last_update2022-08-13 12:04:33
depth0
children0
last_payout2022-08-20 12:04:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value6.047 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,944
author_reputation273,261,352,410,025
root_title"[ESP-ENG] Titulos y enlaces en techguide || Titles and links in techguide"
beneficiaries
0.
accountreward.app
weight10,000
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,684,969
net_rshares16,329,115,746,703
author_curate_reward""
vote details (27)