python实战网络刷博器爬虫源码奉献

import webbrowser as web  #导入webbrowser模块给它重命名为web

import time               #导入时间模块

import os                 #导入系统模块   

import random             #导入随机模块

count=random.randint(2,4)

j=0

while 1:

    i=0

    while i<=9:

        web.open_new_tab("http://user.qzone.qq.com/961769710/infocenter?ptsig=1AIixJu5OvcSf8nartjXBED4v-EddCLEPxBO8If1DGI_")   #在新的页面打开

        i=i+1

        time.sleep(2)   #休息两秒

    else:

        os.system("taskkill /F /IM 360se.exe")            #关闭浏览器

        print (j,'times closing Browser!')               #打印这是第几次

    j=j+1


你可能感兴趣的:(python,网络爬虫)