Python Aiohttp Proxies
Сообщение 2023-03-14 21:45:07
0
6Кб
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
Больше
10 sports with dogs
Riding sport is the most popular sport at the moment, where people and animals participate. But...
WALL·E (2008)
In the distant future, a small waste-collecting robot inadvertently embarks on a space journey...
What is entrepreneurship?
Entrepreneurship is the process of identifying opportunities, taking risks, and creating value by...
Война будущего. The Tomorrow War (2021)
Декабрь 2022 года. Во время финала чемпионата мира по футболу в Катаре на поле высаживается...
The Thrills and Responsibilities of Boating: A Comprehensive Guide
Boating is one of the most exhilarating and serene ways to experience the outdoors. Whether...