-
Notifications
You must be signed in to change notification settings - Fork 0
/
2.py
31 lines (23 loc) · 762 Bytes
/
2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
# driver = webdriver.PhantomJS()
#
# driver.get("http://www.u17.com/chapter/266667.html#image_id=1911641")
# # assert "Python" in driver.title
# # elem = driver.find_element_by_name("q")
# # elem.send_keys("pycon")
# # elem.send_keys(Keys.RETURN)
# print(driver.page_source)
# driver = webdriver.Chrome()
# driver.get('http://www.jianshu.com/p/520749be7377')
# time.sleep(1)
# for i in range(10):
# driver.execute_script('window.scrollTo(0,document.body.scrollHeight)')
# time.sleep(1)
#
# driver = webdriver.Chrome()
# driver.get('https://www.baidu.com/')
# elem = driver.find_element_by_id('kw')
# elem.send_keys('爬虫')
# elem.send_keys(Keys.RETURN)