-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.py
More file actions
34 lines (30 loc) · 861 Bytes
/
script.py
File metadata and controls
34 lines (30 loc) · 861 Bytes
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
31
from Crawler import Crawler
if __name__ == '__main__':
crawler = Crawler()
# try:
# crawler.simple_scraping()
# except BaseException as e:
# print("simple_scraping 失败:", e)
# else:
# print("simple_scraping 成功")
#
# try:
# crawler.simulate_as_browser_scraping()
# except BaseException as e:
# print("simulate_as_browser_scraping 失败:", e)
# else:
# print("simulate_as_browser_scraping 成功")
#
# try:
# crawler.phantomjs_scraping()
# except BaseException as e:
# print("phantomjs_scraping 失败:", e)
# else:
# print("phantomjs_scraping 成功")
# exit(1)
try:
crawler.js_scraping()
except BaseException as e:
print("js_scraping 失败:", e)
else:
print("js_scraping 成功")