lyj364161294 发表于 2017-7-26 16:04:32

赶紧

DuiJle 发表于 2017-8-3 12:03:32

哇这就很厉害了

蝈蝈vic 发表于 2017-8-10 14:52:12

hi

流浪1123 发表于 2017-9-10 09:52:02

这个帖子写的,可以。给个奖励。{:5_91:}

起司的喵 发表于 2017-9-10 09:57:58

好东西啊,谢谢楼主分享

shehare 发表于 2017-9-11 19:13:52

学习一下

wujifu333 发表于 2017-9-13 19:27:52

学习

wujifu333 发表于 2017-9-13 19:31:11

为什么爬不了啊?

wujifu333 发表于 2017-9-13 19:32:01

RESTART: C:/Users/Administrator/AppData/Local/Programs/Python/Python35-32/鱼c学习代码/百度图片爬虫.py
当前图片:0
由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。
服务器长时间无响应,自动切换代理.....
Traceback (most recent call last):
File "C:/Users/Administrator/AppData/Local/Programs/Python/Python35-32/鱼c学习代码/百度图片爬虫.py", line 36, in get_result
    return urllib.request.urlretrieve(req_or_url,filename)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\urllib\request.py", line 188, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\urllib\request.py", line 163, in urlopen
    return opener.open(url, data, timeout)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\urllib\request.py", line 466, in open
    response = self._open(req, data)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\urllib\request.py", line 484, in _open
    '_open', req)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\urllib\request.py", line 444, in _call_chain
    result = func(*args)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\urllib\request.py", line 1282, in http_open
    return self.do_open(http.client.HTTPConnection, req)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\urllib\request.py", line 1257, in do_open
    r = h.getresponse()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\http\client.py", line 1198, in getresponse
    response.begin()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\http\client.py", line 297, in begin
    version, status, reason = self._read_status()
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\http\client.py", line 258, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\socket.py", line 576, in readinto
    return self._sock.recv_into(b)
TimeoutError: 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\random.py", line 262, in choice
    i = self._randbelow(len(seq))
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\random.py", line 239, in _randbelow
    r = getrandbits(k)          # 0 <= r < 2**k
ValueError: number of bits must be greater than zero

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:/Users/Administrator/AppData/Local/Programs/Python/Python35-32/鱼c学习代码/百度图片爬虫.py", line 121, in <module>
    download()#开始下载
File "C:/Users/Administrator/AppData/Local/Programs/Python/Python35-32/鱼c学习代码/百度图片爬虫.py", line 114, in download
    get_result(pic_url,True,save_path+'\\'+file_name)
File "C:/Users/Administrator/AppData/Local/Programs/Python/Python35-32/鱼c学习代码/百度图片爬虫.py", line 55, in get_result
    change_proxy()
File "C:/Users/Administrator/AppData/Local/Programs/Python/Python35-32/鱼c学习代码/百度图片爬虫.py", line 78, in change_proxy
    proxy = random.choice(proxies)
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python35-32\lib\random.py", line 264, in choice
    raise IndexError('Cannot choose from an empty sequence')
IndexError: Cannot choose from an empty sequence

hefu77 发表于 2017-9-13 21:50:31

哈哈哈

eole^y 发表于 2017-9-14 09:08:08

作者有点不正经,我要搜你的裸照

mass 发表于 2017-9-14 11:57:26

回复看隐藏

ah001 发表于 2017-9-14 23:37:29

LOOK

Mansic_HO 发表于 2017-9-28 18:45:12

see see

初雪者 发表于 2017-11-28 18:30:21

学习

heisenbug601 发表于 2017-12-27 21:31:15

{:5_109:}

475759385 发表于 2017-12-28 11:25:05

学习,学习

逗逼小龙 发表于 2017-12-28 12:09:29

谢谢分享

suiyisuixin2017 发表于 2017-12-28 12:12:37

查看

五五66 发表于 2017-12-28 13:40:18

吸取精华{:10_256:}
页: 9 10 11 12 13 14 15 16 17 18 [19] 20 21 22 23 24
查看完整版本: python爬虫第三弹:爬百度图片