写一个简单刷博爬虫器。
#网络刷博爬虫器
import webbrowser as web
import time
import os
import random
#产生一个随机数
count = random.randint(1,3)
print (count)
# 打开网页博客
j = 0
while j <= count:
i = 0
while i <= 4:
web.open_new_tab('http://blog.csdn.net/liupeng1985/article/details/28108257')
i = i+1
time.sleep(0.5)
else:
os.system('taskkill /F /IM 360se.exe') #关闭浏览器
print (j, 'Close browser!')
j = j+1
解释: 在第二个while循环中,自动打开4次微博窗口。