爬虫

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from selenium import webdriver

# 装载驱动
driverfile_path = r'C:\Users\zx\AppData\Local\Programs\Python\Python36-32\msedgedriver.exe'
one_driver = webdriver.Edge(executable_path=driverfile_path)

# 跳转到指定网址
one_driver.get(url)

# 示例:
.find_elements_by_tag_name('td')
.find_elements_by_class_name('result-row')
.get_attribute("src")
.text

# 退出
one_driver.quit()