Python Aiohttp Proxies
Сообщение 2023-03-14 21:45:07
0
8Кб
The following example shows how to use aiohttp to handle HTTP requests. We’ll send an HTTP GET request to the https://ip.example.com web page. After receiving the request, the web page returns the IP address of the requester.
Let’s start by creating the get_response() async function:
async def get_response():
async with aiohttp.ClientSession() as session:
async with session.get( 'https://ip.example.com/' ) as response:
print('Status Code: ', response.status)
print('Body: ', await response.text())
Поиск
Категории
- Arts
- Business
- Computers
- Игры
- Health
- Главная
- Kids and Teens
- Деньги
- News
- Recreation
- Reference
- Regional
- Science
- Shopping
- Society
- Sports
- Бизнес
- Деньги
- Дом
- Досуг
- Здоровье
- Игры
- Искусство
- Источники информации
- Компьютеры
- Наука
- Новости и СМИ
- Общество
- Покупки
- Спорт
- Страны и регионы
- World
Больше
Unveiling Earth's Secrets: Exploring the Wonders of Earth Sciences
Unveiling Earth's Secrets: Exploring the Wonders of Earth Sciences
Earth, our home planet, is a...
The Tomorrow War (2021)
A family man is drafted to fight in a future war where the fate of humanity relies on his ability...
Spirit Untamed (2021)
Lucky Prescott's life is changed forever when she moves from her home in the city to a small...
Interesting Central American Countries / Cities
Ranking of Central American countries by interestingness
Due to the fact that I spent as...
Зелёная миля. The Green Mile. (1999)
Пол Эджкомб — начальник блока смертников в тюрьме «Холодная гора», каждый из...