I am downloading multiple reports from a website. Each report has its own URL. Some URLs are loading fine without a problem.
But there is one URL that produces the following error. All URLs have the same pattern except for query parameter. If I open the URL on my browser it works fine.
I am using Selenium and the Firefox Driver.
Below is my code
if __name__ == "__main__":
firefox_options = Options()
#firefox_options.headless = True
driver = webdriver.Firefox(options=firefox_options, executable_path=firefox_driver_location)
logged_in = "no"
for query in sa360_query_array:
print("query being processed is " + query )
if "270348" in query or "269756" in query:
wait_time = 300
else:
wait_time = 15
driver.get(query)
print("Page wait time is " + str(wait_time))
driver.implicitly_wait(300000)
#print(driver.page_source)
if logged_in !="yes":
google_login(query,email_login,email_password) #This function logs into google account
print("Sleeping 200 seconds")
time.sleep(200)
logged_in = "yes"
#time.sleep(200)
print("reading HTML")
#print(driver.page_source)
read_web = pd.read_html(driver.page_source)#The error occurs on this line
What is that error referring too?