#coding:UFT-8  

import webbrowser  

import os  

import time  #导入的Python函数模块  

i=0  

n=0  

#while True:  #添加while true:将一直执行下去  

while i<1000:    

     i=i+1  

     n=n+1  

     webbrowser.open_new_tab(“http://lifestyle.blog.sohu.com/308521633.html”)      #用浏览器打开要访问的网址  

     time.sleep(1)   #每打开一个网页延迟1秒  

     if n==10:    #每打开10个网页关闭浏览器,防止内存占用有太多  

     n=0  

     os.system(“taskkill/f /im 360chrome.exe”)   #关闭程序命令  

     else:  

        print”已访问1000次”