-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestSpider.py
More file actions
29 lines (26 loc) · 828 Bytes
/
Copy pathTestSpider.py
File metadata and controls
29 lines (26 loc) · 828 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
import time
from BaiduSpiderFinal import BaiduSpider
from BiliBiliSpiderSelenium import BiliBiliSpider
from WeiBoSpiderSelenium import WeiBoSpider
from ZhihuSpiderSelenium import ZhiHuSpider
from datetime import datetime
if __name__ == "__main__":
# now = str(datetime.now().strftime("%Y/%m/%d/%H:%M:%S"))
now = datetime.now()
t1 = time.time()
baidu = BaiduSpider(now)
baidu.main()
print("百度爬取完毕!")
bilibili = BiliBiliSpider(now)
bilibili.main()
print("B站爬取完毕!")
weibo = WeiBoSpider(now)
weibo.main()
print("微博爬取完毕!")
zhihu = ZhiHuSpider(now)
zhihu.main()
print("知乎爬取完毕!")
t2 = time.time()
print('用时: ', t2 - t1)
# print(date.ctime())
# print(datetime.now().strftime("%Y/%m/%d/%H:%M:%S"))