I am newbie in using Selenium. Recently, I am trying to scrap data from JODI data source. This link is workable in browser but when I use Selenium or bs4 to access this link (in code) it shows error (unable to access). If not mistaken, this is a dynamic website
I have installed chrome driver and this is the first few lines of my code. Any idea how to solve this?
import time
import pandas as pd
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from bs4 import BeautifulSoup
chrome_service = webdriver.ChromeService(executable_path=r'C:\Users\user\Downloads\chromedriver-win64\chromedriver-win64\chromedriver.exe')
driver = webdriver.Chrome(service=chrome_service)
driver.get(r'http://www.jodidb.org/TableViewer/tableView.aspx')
The problem is you are missing the rest of the URL that specifies a report.
Your URL
http://www.jodidb.org/TableViewer/tableView.aspx
A valid URL
http://www.jodidb.org/TableViewer/tableView.aspx?ReportId=93906
^^^^^^^^^^^^^^^
Pick the desired report, copy the full URL, and then it should work.