crawlee-python/docs/deployment/code_examples/apify/proxy_advanced_example.py

21 lines
451 B
Python

import asyncio
from apify import Actor
async def main() -> None:
async with Actor:
proxy_configuration = await Actor.create_proxy_configuration(
password='apify_proxy_YOUR_PASSWORD',
# Specify the proxy group to use.
groups=['RESIDENTIAL'],
# Set the country code for the proxy.
country_code='US',
)
# ...
if __name__ == '__main__':
asyncio.run(main())