标签:
下面分享一个小脚本,用来刷网页PV。
[root@huanqiu ~]# cat www.py
#!/usr/bin/python
# coding: UTF-8
import webbrowser as web
import time
import os
import random
data = raw_input(‘请输入网址:‘)
count = random.randint (3,5)
j = 0
while j <count:
i = 0
while i <= 3:
web.open_new_tab(data)
i=i+1
time.sleep(0.8)
else:
os.system(‘taskkill /F /IM chrome.exe‘)
print j, ‘times closing Browser !‘
j = j+1
[root@huanqiu ~]# chmod 755 www.py
[root@huanqiu ~]# python www.py #执行脚本,会提示输入网址,比如输入http://www.huanqiu.com/
请输入网址:
标签:
原文地址:http://www.cnblogs.com/kevingrace/p/5953264.html