fb_pixel

How to download web page and parse html tags?

Development | Web Development
Description
How can i download  web page? Then i will parse it.

<div id="entryPageContent" class="cssBaseOne">...</div>
Attachments
No attachments
Info
Description
You must use selenium, for example:

options = webdriver.FirefoxOptions()
options.add_argument('-headless')
browser = webdriver.Firefox(executable_path=geckodriver, options=options)
# url  
browser.get("http://website.com")
# save output
with open("/tmp/parse-page.html", "w") as f:
     f.write(browser.page_source)
# make screemshot for debug
browser.save_screenshot('/tmp/headless_firefox_test.png')
browser.quit()

Now, you have website.com in output   parse-page.html
For more detail see my paid E2E framework..

on October 24th, 2019 (9:01 pm)
All coments
This job has not been commented yet.