create account

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

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

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

Un saludo lector de mi blog. Si eres un nuevo usuario en Linux o estás aprendiendo sobre su funcionamiento e instalación de programas. Esta publicación es para ti. 

 Vengo a entregarte un nuevo script en Python que podrás usar para obtener los títulos y enlaces en [linuxlinks](https://www.linuxlinks.com/).

**linuxlinks** es un sitio web que presenta publicaciones sobre Linux; guías de instalación, revisiones y tutoriales sobre programas que podemos usar en diferentes distribuciones de Linux. La estructura de las publicaciones está orientada para usuarios novatos, por lo que es muy difícil encontrar contenido relacionado para un uso más avanzado o experimental en Linux que requiere resolver problemas complejos o detallados.

Otro aspecto interesante es que contiene una pequeña sección introductoria sobre Data Science usando los lenguajes de programación Python y R para aquellos que quieran aprender un poco sobre esta disciplina en auge; demandada por muchas empresas que requieren realizar análisis de datos.

Personalmente, no encuentro más aspectos resaltantes en este sitio web. Sin embargo, considero este sitio web ideal para aquellas personas que están empezando a conocer Linux y todo el potencial que tiene por descubrir.

Doy por culminada esta brevísima entrega. Espero que pronto vuelva a visitar mi blog. Hasta pronto.

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

<blockquote>

Greetings reader of my blog. If you are a new user in Linux or you are learning about its operation and installation of programs. This post is for you. 

I'm here to give you a new Python script that you can use to get the titles and links on [linuxlinks](https://www.linuxlinks.com/).

**linuxlinks** is a web site that presents publications about Linux; installation guides, reviews and tutorials about programs that we can use in different Linux distributions. The structure of the publications is oriented for novice users, so it is very difficult to find related content for a more advanced or experimental use in Linux that requires solving complex or detailed problems.

Another interesting aspect is that it contains a small introductory section on Data Science using Python and R programming languages for those who want to learn a little about this booming discipline; demanded by many companies that need to perform data analysis.

Personally, I do not find more highlights in this website. However, I consider this website ideal for those people who are just starting to learn about Linux and all the potential it has to discover.

I will end this very short installment. I hope you will visit my blog again soon. See you 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 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 pagesidx in range(1,6):
    
    client=httpx.Client()
    linuxlinks=client.get(f'https://www.linuxlinks.com/page/{pagesidx}/',headers=headers).text
    linuxlinks_raw=HTMLParser(linuxlinks)

    for get_hl in linuxlinks_raw.css('h2 > a'):
    
        print(f"Titles: {get_hl.text(strip=True)},Links: {get_hl.attrs['href']}")   

</pre>

</div>

<center>

![result.png](https://files.peakd.com/file/peakd-hive/pynomiems/23swfuNBKQnT9n6Qh3zajhBha2knUrfYyAymE3TnspcEXePX9uWJfsfERDQUmNaGU1D8b.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-linuxlinks-oror-titles-and-links-in-linuxlinks
categoryhive-148441
json_metadata{"app":"peakd/2022.07.1","format":"markdown","tags":["development","news","tech","linux"],"users":[],"image":["https://files.peakd.com/file/peakd-hive/pynomiems/AKtUYxbq49yVdGqV1p5xwaZvXRL757wACuPuNV4ghQkgpEcdhv2ZZPKwYN25P7r.png","https://files.peakd.com/file/peakd-hive/pynomiems/23swfuNBKQnT9n6Qh3zajhBha2knUrfYyAymE3TnspcEXePX9uWJfsfERDQUmNaGU1D8b.png"]}
created2022-08-11 11:01:30
last_update2022-08-11 11:01:30
depth0
children0
last_payout2022-08-18 11:01:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value6.567 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,997
author_reputation273,261,352,410,025
root_title"[ESP-ENG] Titulos y enlaces en linuxlinks || Titles and links in linuxlinks"
beneficiaries
0.
accountreward.app
weight10,000
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id115,628,176
net_rshares17,241,634,978,982
author_curate_reward""
vote details (52)