I have deployed a streamlit web app which has web scraping features implemented to an Azure Web App instance, yet I am getting this error when the web page loads:
WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127
I have found in other replies that some packages may need to be installed (chromium-browser, seleniumbase), but when I add them to requirements.txt, the deployment fails entirely.
I used the code below for web scraping with Streamlit using the Selenium web driver, and it was successfully deployed to the Azure App Service.
Code :
Output :
The following code ran successfully. I received the Streamlit output in the browser, where you can enter your desired URL. For example, I entered a flowers website URL as shown below.
Upon clicking the Scraping title above, I was directed to the flowers website.
In the Azure Web App, I added the below startup command in Configuration > General settings > Startup Command.
Azure Web app output :
I entered a cars website URL as shown below.