0

Selenium works for normal url starting with www like "www.nseindia.com" but doesn't work for "www1.nseindia.com". Any fix possible on google colab? Below is working code to replicate the problem.

!pip install selenium
!apt-get update 
!apt install chromium-chromedriver

from selenium import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')

url_nse = 'https://www1.nseindia.com'
driver = webdriver.Chrome('chromedriver',options=chrome_options)
driver.get(url_nse)

Error:

TimeoutException: Message: timeout: Timed out receiving message from renderer: -0.001
  (Session info: headless chrome=97.0.4692.71)

PS: headless chrome option required for running in google colab

Raunak Lohiya
  • 21
  • 1
  • 7

0 Answers0