issue 10
(runtime error) reported by FREDERICK.Mao
- 开始采集http://www.china-pub.com/45370详细页
Traceback (most recent call last):
File "polling.py", line 71, in <module>
polling()
File "polling.py", line 49, in polling
dispatch.Query(keyword=r[1].encode("gbk"),sessionid=r[2].encode
("gbk"),quer
id=r[3].encode("gbk"))
File "C:\cnbookcrawler\code\dispatch.py", line 10, in Query
chinapub.Query(keyword,sessionid,queryid)
File "C:\cnbookcrawler\code\chinapub.py", line 180, in Query
queryid=queryid)
File "C:\cnbookcrawler\code\chinapub22.py", line 29, in BookInfo2DB
content=GetHtml(url);
File "C:\cnbookcrawler\code\chinapub22.py", line 325, in GetHtml
except URLError,e:
NameError: global name 'URLError' is not defined
开始采集http://www.china-pub.com/45370详细页
Traceback (most recent call last):
File "polling.py", line 71, in <module>
polling()
File "polling.py", line 49, in polling
dispatch.Query(keyword=r[1].encode("gbk"),sessionid=r[2].encode
("gbk"),quer
id=r[3].encode("gbk"))
File "C:\cnbookcrawler\code\dispatch.py", line 10, in Query
chinapub.Query(keyword,sessionid,queryid)
File "C:\cnbookcrawler\code\chinapub.py", line 180, in Query
queryid=queryid)
File "C:\cnbookcrawler\code\chinapub22.py", line 29, in BookInfo2DB
content=GetHtml(url);
File "C:\cnbookcrawler\code\chinapub22.py", line 325, in GetHtml
except URLError,e:
NameError: global name 'URLError' is not defined
issue 1
(chinapub_soup_error) commented on by FREDERICK.Mao
- 在chinapub.py line 51加入了特别的判断
if content.find("对不起!出错啦!请按如下方式联系客服!")<>-1:
print "找不到相关的结果,因此返回了,不进行后续的操作"
return
在chinapub.py line 51加入了特别的判断
if content.find("对不起!出错啦!请按如下方式联系客服!")<>-1:
print "找不到相关的结果,因此返回了,不进行后续的操作"
return
May 05, 2009
issue 1
(chinapub_soup_error) commented on by FREDERICK.Mao
- 当你搜索以下字符时会出现下面的页面效果
Eric Meyer谈CSS 卷1
对不起!出错啦!请按如下方式联系客服!
客服电话 总机:(010)68320388 联系客服
客服工作时间:周一至周五 7:30-19:30 周六至周日 9:00-17:30
issue 1
(chinapub_soup_error) reported by FREDERICK.Mao
- Traceback (most recent call last):
File "polling.py", line 71, in <module>
polling()
File "polling.py", line 49, in polling
dispatch.Query(keyword=r[1].encode("gbk"),sessionid=r[2].encode
("gbk"),query
id=r[3].encode("gbk"))
File "C:\Inetpub\wwwroot\dispatch.py", line 10, in Query
chinapub.Query(keyword,sessionid,queryid)
File "C:\Inetpub\wwwroot\chinapub.py", line 57, in Query
js=soup.find('div',{"id":"myjson"}).nextSibling.nextSibling.decode
("utf8").e
ncode("gbk")
AttributeError: 'NoneType' object has no attribute 'nextSibling'
Traceback (most recent call last):
File "polling.py", line 71, in <module>
polling()
File "polling.py", line 49, in polling
dispatch.Query(keyword=r[1].encode("gbk"),sessionid=r[2].encode
("gbk"),query
id=r[3].encode("gbk"))
File "C:\Inetpub\wwwroot\dispatch.py", line 10, in Query
chinapub.Query(keyword,sessionid,queryid)
File "C:\Inetpub\wwwroot\chinapub.py", line 57, in Query
js=soup.find('div',{"id":"myjson"}).nextSibling.nextSibling.decode
("utf8").e
ncode("gbk")
AttributeError: 'NoneType' object has no attribute 'nextSibling'