-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
enhancementNew feature or requestNew feature or request
Description
What about simplifying
import asyncio
from base64 import b64decode
from zyte_api.aio.client import AsyncClient
async def main():
client = AsyncClient()
api_response = await client.request_raw(
{
'url': 'https://toscrape.com',
'httpResponseBody': True,
}
)
http_response_body: bytes = b64decode(
api_response['httpResponseBody']
)
asyncio.run(main())as
import asyncio
from zyte_api.aio.client import AsyncClient
async def main():
client = AsyncClient()
api_response = await client.extract(
url='https://toscrape.com',
http_response_body=True,
)
http_response_body: bytes = api_response.http_response_body
asyncio.run(main())Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request