码迷,mamicode.com
首页 > 编程语言 > 详细

Python 简单爬虫

时间:2014-06-06 21:45:47      阅读:293      评论:0      收藏:0      [点我收藏+]

标签:c   class   blog   code   a   http   

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import os
import time
import webbrowser as web
import random
count = random.randint(20,40)
j = 0
 
while j < count:
    i = 0
    while i <= 5:
        web.open_new_tab(http://www.cnblogs.com/evilxr/p/3764287.html)
        i = i + 1
        time.sleep(1)       #浏览器暂停1秒
    else:
        os.system(‘killall firefox‘)    #关闭浏览器
    j = j + 1
    print j,‘times closing Browser!‘

 

Python 简单爬虫,布布扣,bubuko.com

Python 简单爬虫

标签:c   class   blog   code   a   http   

原文地址:http://www.cnblogs.com/evilxr/p/3765773.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!