Python Aiohttp Proxies
Postado 2023-03-14 21:45:07
0
10KB
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())
Pesquisar
Categorias
- Arts
- Business
- Computers
- Jogos
- Health
- Início
- Kids and Teens
- Money
- News
- Recreation
- Reference
- Regional
- Science
- Shopping
- Society
- Sports
- Бизнес
- Деньги
- Дом
- Досуг
- Здоровье
- Игры
- Искусство
- Источники информации
- Компьютеры
- Наука
- Новости и СМИ
- Общество
- Покупки
- Спорт
- Страны и регионы
- World
Leia mais
11 Chill Punk Vibes for Alternative Relaxation: A Unique Soundtrack to Unwind, Focus, and Let Go
When you think of punk, your mind might go straight to high-energy chaos, sweat-drenched shows,...
Фарго. Fargo. (1996)
Для робкого менеджера по продажам, работающего у собственного тестя, похищение собственной жены...
The Terminator. (1984)
A human soldier is sent from 2029 to 1984 to stop an almost indestructible cyborg killing...
How to Create a Viral Newsbreak: Techniques and Examples
Viral newsbreaks help to achieve different KPIs: increase awareness, engagement, and audience...
Algorithm
An algorithm is a clear sequence of actions, the implementation of which gives some kind of...