python download complete web page

Solutions on MaxInterview for python download complete web page by the best coders in the world

showing results for - "python download complete web page"
Yusuf
02 Mar 2017
1# pip install selenium
2from selenium import webdriver
3from selenium.webdriver.common.action_chains import ActionChains
4from selenium.webdriver.common.keys import Keys
5
6br = webdriver.Firefox(firefox_binary=binary,
7                               executable_path="path_to_webdriver")
8
9br.get('http://www.google.com/')
10
11save_me = ActionChains(br).key_down(Keys.CONTROL)\
12         .key_down('s').key_up(Keys.CONTROL).key_up('s')
13save_me.perform()
14