I would like to have the source code of this page for example : https://paris-sportifs.pmu.fr/event/699032
Below is my code snippet:
opts = Options()
opts.add_argument("Host=[paris-sportifs.pmu.fr]")
capabilities = DesiredCapabilities.FIREFOX
capabilities["marionette"] = True
browser = webdriver.Firefox(options=opts, capabilities=capabilities)
browser.get(event_url)
time.sleep(3)
div_list = browser.find_elements_by_class_name('table--header--inner.collapsed')
for item in div_list:
browser.execute_script("arguments[0].click();", item)
The click function is working properly, and if I click on show source code within the selenium browser, the source code is the one expected. But if I do this :
html = browser.page_source
print(len(browser.page_source))
The result of the len is 1472551 instead of more than 4000000.
I've tried to wait a while (even watched using a while True loop to see if the result is changing), but without any effect at all.
Any idea ?
Thanks