| | |
Web Spider Help
Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: May 2009
Posts: 28
Reputation:
Solved Threads: 1
I am coding a web spider for research purposes and have run into an error I am uncertain about. I am fairly new to web programming and need a bit of guidance. I use http.client to get a connection, request a site, get the response, and read the resonse into a variable. Then, using HTMLparser, I attempt to read() the variable, but am given this error:
Traceback (most recent call last):
File "C:\Users\snorris4\Desktop\FLOSSmoleSpiderSavannah\src\SavannahSpider.py", line 45, in <module>
main()
File "C:\Users\snorris4\Desktop\FLOSSmoleSpiderSavannah\src\SavannahSpider.py", line 41, in main
spider.feed(page)
File "C:\Python31\lib\html\parser.py", line 107, in feed
self.rawdata = self.rawdata + data
TypeError: Can't convert 'bytes' object to str implicitly
Any help would be very much appreciated. Thank you.
Traceback (most recent call last):
File "C:\Users\snorris4\Desktop\FLOSSmoleSpiderSavannah\src\SavannahSpider.py", line 45, in <module>
main()
File "C:\Users\snorris4\Desktop\FLOSSmoleSpiderSavannah\src\SavannahSpider.py", line 41, in main
spider.feed(page)
File "C:\Python31\lib\html\parser.py", line 107, in feed
self.rawdata = self.rawdata + data
TypeError: Can't convert 'bytes' object to str implicitly
Any help would be very much appreciated. Thank you.
![]() |
Similar Threads
- Looking for PHP Web Spider Script (PHP)
- Web Spider? (Python)
- Have you ever used ''Open Web Spider''? How to start using it? (Existing Scripts)
- How to Create Web Spider / Crawler? (JavaScript / DHTML / AJAX)
- Web spider (IT Professionals' Lounge)
Other Threads in the Python Forum
- Previous Thread: Socket programming with a service
- Next Thread: Newbie With Function Trouble
| Thread Tools | Search this Thread |
Tag cloud for Python
ansi assignment avogadro backend beginner binary bluetooth character cmd code customdialog data decimals dictionary drive dynamic error examples excel exe file float format ftp function gnu graphics gui heads homework http ideas import input java leftmouse line linux list lists logging loop module mouse newb number numbers output parsing path pointer port prime program programming progressbar projects push py2exe pygame pyqt python random recursion recursive refresh schedule screensaverloopinactive script scrolledtext sqlite ssh statistics stdout string strings sudokusolver sum table terminal text thread threading time tkinter tlapse tricks tuple tutorial ubuntu unicode update urllib urllib2 variable wikipedia windows write wxpython xlib





