Coverage for meta_tags_parser/download.py: 100%
9 statements
« prev ^ index » next coverage.py v7.10.3, created at 2025-09-18 21:46 +0000
« prev ^ index » next coverage.py v7.10.3, created at 2025-09-18 21:46 +0000
1import typing
3import httpx
6def download_page_sync(uri_of_page: str) -> str:
7 response_obj: typing.Final[httpx.Response] = httpx.get(uri_of_page)
8 return response_obj.text
11async def download_page_async(uri_of_page: str) -> str:
12 async with httpx.AsyncClient() as client:
13 response_obj: typing.Final[httpx.Response] = await client.get(uri_of_page)
14 return response_obj.text