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
async with Actor:
proxy_configuration = await Actor.create_proxy_configuration(
groups=['RESIDENTIAL'],
country_code='IT',
)
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.
3 Replies
Pepa J
Pepa J9mo ago
Hi @Poochie , Can you send me the RunId to the private message, so we can investigate?
rival-black
rival-blackOP9mo ago
-> I withdraw the request, it was me being dumb and not passing proxy_url to the HTTPX client...
Pepa J
Pepa J9mo ago
I am glad it got sorted out 🙂 Next time please ask in #🐍apify-python for Apify and Python implementation related topics. 🙂

Did you find this page helpful?