Telegram Group & Telegram Channel
🔥 Полезные библиотеки Python

Requests-HTML
— максимально простая и интуитивно понятная библиотека для парсинга html включая асинхронный парсинг.

Установка:
$ pip install requests-html

Пример использования:

1️⃣
from requests_html import HTMLSession
session = HTMLSession()
r = session.get('https://python.org/')


2️⃣
from requests_html import AsyncHTMLSession
asession = AsyncHTMLSession()
async def get_pythonorg():
r = await asession.get('https://python.org/')
return r

async def get_reddit():
r = await asession.get('https://reddit.com/')
return r

async def get_google():
r = await asession.get('https://google.com/')
return r

results = asession.run(get_pythonorg, get_reddit, get_google)
results # check the requests all returned a 200 (success) code
[<Response [200]>, <Response [200]>, <Response [200]>]

for result in results:
print(result.html.url)


Из коробки поддерживает сохранение cookie файлов, имитирует user-agent, асинхронные запросы, JavaScript и д.р. плюшки.

⚙️ GitHub/Инструкция

#python #github #soft
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/githubdevs/501
Create:
Last Update:

🔥 Полезные библиотеки Python

Requests-HTML
— максимально простая и интуитивно понятная библиотека для парсинга html включая асинхронный парсинг.

Установка:
$ pip install requests-html

Пример использования:

1️⃣

from requests_html import HTMLSession
session = HTMLSession()
r = session.get('https://python.org/')


2️⃣
from requests_html import AsyncHTMLSession
asession = AsyncHTMLSession()
async def get_pythonorg():
r = await asession.get('https://python.org/')
return r

async def get_reddit():
r = await asession.get('https://reddit.com/')
return r

async def get_google():
r = await asession.get('https://google.com/')
return r

results = asession.run(get_pythonorg, get_reddit, get_google)
results # check the requests all returned a 200 (success) code
[<Response [200]>, <Response [200]>, <Response [200]>]

for result in results:
print(result.html.url)


Из коробки поддерживает сохранение cookie файлов, имитирует user-agent, асинхронные запросы, JavaScript и д.р. плюшки.

⚙️ GitHub/Инструкция

#python #github #soft

BY GitHub программиста




Share with your friend now:
tg-me.com/githubdevs/501

View MORE
Open in Telegram


GitHub программиста Telegram | DID YOU KNOW?

Date: |

Find Channels On Telegram?

Telegram is an aspiring new messaging app that’s taking the world by storm. The app is free, fast, and claims to be one of the safest messengers around. It allows people to connect easily, without any boundaries.You can use channels on Telegram, which are similar to Facebook pages. If you’re wondering how to find channels on Telegram, you’re in the right place. Keep reading and you’ll find out how. Also, you’ll learn more about channels, creating channels yourself, and the difference between private and public Telegram channels.

That growth environment will include rising inflation and interest rates. Those upward shifts naturally accompany healthy growth periods as the demand for resources, products and services rise. Importantly, the Federal Reserve has laid out the rationale for not interfering with that natural growth transition.It's not exactly a fad, but there is a widespread willingness to pay up for a growth story. Classic fundamental analysis takes a back seat. Even negative earnings are ignored. In fact, positive earnings seem to be a limiting measure, producing the question, "Is that all you've got?" The preference is a vision of untold riches when the exciting story plays out as expected.

GitHub программиста from ru


Telegram GitHub программиста
FROM USA