Streamlit interaction issues with Selenium

Hey! I’m trying to do a tiny app to make my webscraping script more useful. So I decided to use Streamlit.
When I call the class which make the scrap, the Streamlit gets an error: " ModuleNotFoundError: No module named ‘selenium’ "
I have no ideia whats going on, because i’m using the correct env to run the app (which already have Selenium)

Specs:

  • Streamlit Version: 0.61.0
  • Python Version: 3.8.3
  • Env: Conda
  • OS: Windows
  • Browser: Opera

Some screenshots:

image

image

image

Hi Victor
Did you make it work in the end?

Hey @Charly_Wargnier -

I’m in the middle of writing a blog post about this, but in the meantime, you can see how to use SeleniumBase to test Streamlit apps in this repo:

Cheers Randy!

I’d like to port this script to Streamlit:

Wouldn’t it work out of the box? (that is, w.o the need for folium?)

Thanks,
Charly

Yes, the point wasn’t to highlight folium, just that you can use the SeleniumBase Python package to easily test Streamlit apps (or, do actual work)

1 Like

Thanks Randy, that makes sense!

Quick update: I tried to port one of my Colab notebook relying on Selenium to Streamlit and it (expectedly?) doesn’t work.

So here comes my project for the weekend! Porting my code to SeleniumBase to make it work in Streamlit! :slight_smile:

Hello everybody,

I am having similar issues with Selenium during Stremlit app deployment.
How to fix this problem?