2019-01-30
阅读量:
1026
如何增加网站的观看次数?
如何在爬虫时增加网站的观看次数?
注意:这不适用于所有网站,例如youtube。
我们将学习的是在特定的时间间隔后一次又一次地刷新网页。
#!/usr / bin / env python
from selenium import webdriver
import time
# set webdriver path here it may vary
brower = webdriver.Chrome(executable_path ="C:\Program Files (x86)\Google\Chrome\chromedriver.exe")
website_URL ="https://www.google.co.in/"
brower.get(website_URL)
# After how many seconds you want to refresh the webpage
# Few website count view if you stay there
# for a particular time
# you have to figure that out
refreshrate = int(15)
# This would keep running until you stop the compiler.
while True:
time.sleep(refreshrate)
brower.refresh()






评论(0)


暂无数据
推荐帖子
0条评论
0条评论
0条评论