hola querido lector de mi blog. Nuevamente, traigo para ti un nuevo script elaborado con Python que podrás aplicarlo en el sitio web digital-science, un blog creado en el 2010 con el propósito de informarte sobre investigaciones científicas provenientes de diferentes regiones del planeta. Su labor básicamente consiste en recopilar y sistematizar investigaciones científicas de forma colaborativa y abierta. Obviamente, tambien asesoran y ofrecen soporte a los investigadores en sus áreas. La razón de esta iniciativa es que consideran las investigaciones como un pilar importante que pueden generar impactos positivos en la sociedad a largo plazo y por supuesto, desarrollar una comprensión más exacta y real de mundo.
Puedes visitar este sitio web y consultar sus reportes o datos en línea y podrás apreciar con más detalles el enorme esfuerzo y resultados alcanzados con más de 10 años de trayectoria. Si eres investigador y sientes que tus ideas necesitan ser tomadas en cuenta o tienes dudas con tus investigaciones, quizás este sitio web encuentres el apoyo que necesitas.
Gracias por leer, pronto volveré con más para ti. Abajo está el script en Python.
Este script fue ejecutado con Python 3.9.13 en el sistema operativo Lubuntu 18.04.6.
hello dear reader of my blog. Again, I bring for you a new script made with Python that you can apply in the website digital-science, a blog created in 2010 with the purpose of informing you about scientific research from different regions of the planet. Its work basically consists of collecting and systematizing scientific research in a collaborative and open way. Obviously, they also offer advice and support to researchers in their areas. The reason for this initiative is that they consider research as an important pillar that can generate positive impacts on society in the long term and of course, develop a more accurate and real understanding of the world.
You can visit this website and consult their reports or data online and you will be able to appreciate in more detail the enormous effort and results achieved with more than 10 years of trajectory. If you are a researcher and you feel that your ideas need to be taken into account or you have doubts with your research, maybe this website will give you the support you need.
Thanks for reading, I will be back soon with more for you. Below is the Python script.
This script was run with Python 3.9.13 on Lubuntu 18.04.6 operating system.
import asyncio
import aiohttp
from selectolax.parser import HTMLParserheaders={'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 get_site():
async with aiohttp.ClientSession() as session: for find_index in range(1,6): async with session.get(f'https://www.digital-science.com/blog/page/{find_index}/',headers=headers) as page: digitalscience=await page.text() digitalscience_raw_html=HTMLParser(digitalscience) for find_hl in digitalscience_raw_html.css("div a[class='text-sm font-light no-underline leading-0 2xl:text-base']"): headlines=find_hl.text(strip=True) links=find_hl.attributes['href'] print(f'headlines: {headlines} links: {links}')asyncio.run(get_site())