Python入门学习:网络刷博器爬虫

    1. import webbrowser as web  
    2. import time  
    3. import os  
    4. import random  
    5. count = random.randint(5,7)  
    6. j=0  
    7. while j<=count:  
    8.     i=0  
    9.     while i<=8 :  
    10.         web.open_new_tab('网址')  #网址自己填入  
    11.         i=i+1  
    12.         time.sleep(0.8)  
    13.     else:  
    14.         os.system('taskkill /F /IM chrome.exe')  
    15.         print j,'time webbrower closed'  
    16.     j=j+1 
posted @ 2016-09-19 16:13  FlyBack  阅读(127)  评论(0编辑  收藏  举报