为了账号安全,请及时绑定邮箱和手机立即绑定

AttributeError: 'bool' object has no attribute 'timeout'

Traceback (most recent call last):

  File "E:\Java\eclipse-java-neon-1-win32-x86_64\eclipse\test_eclipse\cada\baike_spider\spider_main.py", line 32, in <module>

    obj_spider.craw(root_url)

  File "E:\Java\eclipse-java-neon-1-win32-x86_64\eclipse\test_eclipse\cada\baike_spider\spider_main.py", line 17, in craw

    html_cont = self.downloader.download(new_url)

  File "E:\Java\eclipse-java-neon-1-win32-x86_64\eclipse\test_eclipse\cada\baike_spider\html_downloder.py", line 12, in download

    response = urllib2.urlopen(url,timeout=True)

  File "D:\Python27\lib\urllib2.py", line 154, in urlopen

    return opener.open(url, data, timeout)

  File "D:\Python27\lib\urllib2.py", line 420, in open

    req.timeout = timeout


正在回答

举报

0/150
提交
取消
Python开发简单爬虫
  • 参与学习       227670    人
  • 解答问题       1219    个

本教程带您解开python爬虫这门神奇技术的面纱

进入课程

AttributeError: 'bool' object has no attribute 'timeout'

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信