MCPcopy Create free account
hub / github.com/ZiniuLu/Python-100-Days / download

Function download

Day66-75/code/asyncio02.py:5–11  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

3
4
5async def download(url):
6 print('Fetch:', url)
7 async with aiohttp.ClientSession() as session:
8 async with session.get(url) as resp:
9 print(url, '--->', resp.status)
10 print(url, '--->', resp.cookies)
11 print('\n\n', await resp.text())
12
13
14def main():

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected