(client: httpx.AsyncClient, # <2>
base_url: str,
cc: str)
| 23 | |
| 24 | |
| 25 | async def get_flag(client: httpx.AsyncClient, # <2> |
| 26 | base_url: str, |
| 27 | cc: str) -> bytes: |
| 28 | url = f'{base_url}/{cc}/{cc}.gif'.lower() |
| 29 | resp = await client.get(url, timeout=3.1, follow_redirects=True) # <3> |
| 30 | resp.raise_for_status() |
| 31 | return resp.content |
| 32 | |
| 33 | |
| 34 | async def download_one(client: httpx.AsyncClient, |