Apify and Crawlee Official Forum

Updated 3 months ago

Proxy config for Python with Apify SDK

Sorry if I missed something obvious, but I'm not understanding how to use the residential proxies in my httpx Actor. I found the required snippet
Plain Text
async with Actor:
    proxy_configuration = await  Actor.create_proxy_configuration(
        groups=['RESIDENTIAL'],
        country_code='IT',
    )

But I cannot understand if it actually does anything. Running locally in development I need to skip this code as I am not allowed to use it, but when the actor runs in Apify I encounter no error.
The main reason I'm finding it odd is that my residential usage stats are empty, it only shows datacenter usage.
I'm on the free plan, but it looks like I can use the initial credit to try the feature?

Best.
P
P
4 comments
Hi , Can you send me the RunId to the private message, so we can investigate?
-> I withdraw the request, it was me being dumb and not passing proxy_url to the HTTPX client...
I am glad it got sorted out πŸ™‚
Next time please ask in #🐍apify-python for Apify and Python implementation related topics. πŸ™‚
Add a reply
Sign up and join the conversation on Discord