How to change ip in Streamlit Cloud when Selenium is running

Summary

Hello, I am using Selenium on Streamlit Cloud , And everything is working fine in local. but i think on the Streamlit the ip address will be change to โ€œ35.230.56.30โ€. Therefore some web will detect and block my crawler.

My Question is:
How to change my ip address when I use Selenium to craw the web?

Hello @Theo_K! :wave:

I havenโ€™t personally tried it, but when initializing your Selenium WebDriver instance, it may be possible to configure it to use a proxy server.

Have you tried this?

Best,
Charly

Yes, Iโ€™ve tried proxy in my selenium, and when I run selenium with proxy in local is okay, but on the streamlin cloud, the selenium canโ€™t connect proxy correctly.:sweat_smile::sweat_smile::pray:

Someone could please help meโ€ฆ I am so comfused for a ling time

Thank you for your feedback, @Theo_K! :pray:

The configuration for running Selenium on Streamlit Community Cloud is different from running it on your local machine. Here is a minimal example of how to run Selenium on CCloud:

I hope this helps.

Best wishes,
Charly

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.

@Theo_K has this worked for you?