課程
/后端開發(fā)
/Python
/Python開發(fā)簡(jiǎn)單爬蟲
結(jié)果 輸出 craw 1 : http://baike.baidu.com/view/21087.htm craw failed 就停止了,請(qǐng)問是哪里出錯(cuò)了?
2016-10-23
源自:Python開發(fā)簡(jiǎn)單爬蟲 7-5
正在回答
這是什么問題啊
<type 'exceptions.Exception'> : Couldn't find a tree builder with the features you requested: html_parser. Do you need to install a parser library?
請(qǐng)問 您的問題解決了嗎?我和您的問題應(yīng)該是一樣的打印出異常是:
<type 'exceptions.Exception'> : _get_new_urls() takes exactly 2 arguments (3 given)
但是還是不知道從何入手
檢查你的代碼html_parse.py開頭是否有以下三行代碼(視頻中老師是快捷鍵自動(dòng)引入了這三個(gè)模塊)
from bs4 import BeautifulSoup
import re
import urlparse
我一開始也是遇到這個(gè)問題,只打印了第一個(gè)url。
張草草
craw 1 : http://baike.baidu.com/view/21087.htm
craw filed
找不到錯(cuò)誤的地方
同問!我也出現(xiàn)了
except?Exception,e: ???print?Exception,":",e
把try的except改一下
except Exception,e:
? ?print Exception,":",e
這樣你就可以看到錯(cuò)誤信息了
舉報(bào)
本教程帶您解開python爬蟲這門神奇技術(shù)的面紗
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2017-03-03
這是什么問題啊
2017-03-03
這是什么問題啊
2017-03-03
<type 'exceptions.Exception'> : Couldn't find a tree builder with the features you requested: html_parser. Do you need to install a parser library?
2017-01-23
請(qǐng)問 您的問題解決了嗎?我和您的問題應(yīng)該是一樣的打印出異常是:
<type 'exceptions.Exception'> : _get_new_urls() takes exactly 2 arguments (3 given)
但是還是不知道從何入手
2016-12-17
檢查你的代碼html_parse.py開頭是否有以下三行代碼(視頻中老師是快捷鍵自動(dòng)引入了這三個(gè)模塊)
from bs4 import BeautifulSoup
import re
import urlparse
我一開始也是遇到這個(gè)問題,只打印了第一個(gè)url。
2016-11-03
craw 1 : http://baike.baidu.com/view/21087.htm
craw filed
找不到錯(cuò)誤的地方
2016-11-01
同問!我也出現(xiàn)了
2016-10-31
2016-10-31
把try的except改一下
except Exception,e:
? ?print Exception,":",e
這樣你就可以看到錯(cuò)誤信息了