I am using Selenium and python and I have a website that has Javascript. I define a driver:
chromedriver = "/foldername/chromedriver"
os.environ["webdriver.chrome.driver"] = chromedriver
driver = webdriver.Chrome(chromedriver)
I navigate to the page:
url = '...html'
driver.get(url)
Then I get the page source:
print(driver.page_source)
The issue is that the stuff I actually want to scrape is not present anywhere. It is also not present when I view the page source in Chrome. The only way I know how to view it is by using Firefox - Firebug.
I have also tried things like:
u = driver.find_elements_by_id("wrapper")
text = u[0].get_attribute("innerHTML")
But the stuff I want is also not in text
.
Anything else I can try?