Just writing a simple website spider in python, keep getting these
errors, not sure what to do. The problem seems to be in the feed()
function of htmlparser.
Traceback (most recent call last):
File "spider.py" , line 38, in <module>
s.crawl(site)
File "spider.py" , line 30, in crawl
self.parse(url)
File "spider.py" , line 21, in parse
self.feed(urlop en('http://' + page).read())
File "/Library/Frameworks/Python.framewor k/Versions/2.5/lib/
python2.5/HTMLParser.py", line 107, in feed
self.rawdata = self.rawdata + data
AttributeError: Spider instance has no attribute 'rawdata'
Any ideas of how to fix this? Im using python 2.5.2 on mac osx
errors, not sure what to do. The problem seems to be in the feed()
function of htmlparser.
Traceback (most recent call last):
File "spider.py" , line 38, in <module>
s.crawl(site)
File "spider.py" , line 30, in crawl
self.parse(url)
File "spider.py" , line 21, in parse
self.feed(urlop en('http://' + page).read())
File "/Library/Frameworks/Python.framewor k/Versions/2.5/lib/
python2.5/HTMLParser.py", line 107, in feed
self.rawdata = self.rawdata + data
AttributeError: Spider instance has no attribute 'rawdata'
Any ideas of how to fix this? Im using python 2.5.2 on mac osx
Comment