Function
get_flag
(client: httpx.AsyncClient, # <1>
base_url: str,
cc: str)
Source from the content-addressed store, hash-verified
| 22 | MAX_CONCUR_REQ = 1000 |
| 23 | |
| 24 | async def get_flag(client: httpx.AsyncClient, # <1> |
| 25 | base_url: str, |
| 26 | cc: str) -> bytes: |
| 27 | url = f'{base_url}/{cc}/{cc}.gif'.lower() |
| 28 | resp = await client.get(url, timeout=3.1, follow_redirects=True) # <2> |
| 29 | resp.raise_for_status() |
| 30 | return resp.content |
| 31 | |
| 32 | async def download_one(client: httpx.AsyncClient, |
| 33 | cc: str, |
Tested by
no test coverage detected