8 Responses

  1. 0xLucifer
    0xLucifer 2014 年 8 月 4 日 at 15:11 | | Reply

    正需要这个:)

  2. bystander
    bystander 2014 年 9 月 13 日 at 18:35 | | Reply

    学习一下,python做小工具真的合适.另外..python 2.x和 3.x真是..

  3. mimi
    mimi 2016 年 1 月 25 日 at 16:47 | | Reply

    补充一个获取代理IP的网站

  4. 雷锋
    雷锋 2016 年 4 月 18 日 at 16:51 | | Reply

    这套代码用在IP巴士的代理IP也可以爬

  5. 竹子
    竹子 2017 年 8 月 7 日 at 14:33 | | Reply

    在python2.7下测试。反馈
    Traceback (most recent call last):
    File “E:/proxy/addproxy.py”, line 14, in
    html_doc = urllib2.urlopen(‘http://www.xici.net.co/nn/’ + str(page) ).read()
    File “D:\Anaconda2\lib\urllib2.py”, line 154, in urlopen
    return opener.open(url, data, timeout)
    File “D:\Anaconda2\lib\urllib2.py”, line 435, in open
    response = meth(req, response)
    File “D:\Anaconda2\lib\urllib2.py”, line 548, in http_response
    ‘http’, request, response, code, msg, hdrs)
    File “D:\Anaconda2\lib\urllib2.py”, line 467, in error
    result = self._call_chain(*args)
    File “D:\Anaconda2\lib\urllib2.py”, line 407, in _call_chain
    result = func(*args)
    File “D:\Anaconda2\lib\urllib2.py”, line 654, in http_error_302
    return self.parent.open(new, timeout=req.timeout)
    File “D:\Anaconda2\lib\urllib2.py”, line 435, in open
    response = meth(req, response)
    File “D:\Anaconda2\lib\urllib2.py”, line 548, in http_response
    ‘http’, request, response, code, msg, hdrs)
    File “D:\Anaconda2\lib\urllib2.py”, line 473, in error
    return self._call_chain(*args)
    File “D:\Anaconda2\lib\urllib2.py”, line 407, in _call_chain
    result = func(*args)
    File “D:\Anaconda2\lib\urllib2.py”, line 556, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
    urllib2.HTTPError: HTTP Error 503: Service Temporarily Unavailable

    无法通过

    1. hawk
      hawk 2017 年 9 月 19 日 at 17:09 | | Reply

      加上请求头

Leave a Reply