Created
July 10, 2012 16:12
-
-
Save brapse/3084385 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm going to pause after every step of this process, and explain what I've done. I hope that is sufficiently annoying for you. | |
enter to continue | |
So, first we'll get a list of every player in the NBA and their respective positions off of a list on yahoo sports: | |
http://sports.yahoo.com/nba/players?type=position&c=NBA&pos= | |
This will be the data we will work from. | |
enter to continue | |
Traceback (most recent call last): | |
File "run_me.py", line 9, in <module> | |
scrapenames.scrape('namelist.txt') | |
File "/Users/brapse/Downloads/bball/scrapenames.py", line 15, in scrape | |
soup = BeautifulSoup(html) | |
File "/usr/local/Cellar/python/2.6.5/lib/python2.6/site-packages/bs4/__init__.py", line 100, in __init__ | |
self._feed() | |
File "/usr/local/Cellar/python/2.6.5/lib/python2.6/site-packages/bs4/__init__.py", line 113, in _feed | |
self.builder.feed(self.markup) | |
File "/usr/local/Cellar/python/2.6.5/lib/python2.6/site-packages/bs4/builder/_htmlparser.py", line 46, in feed | |
super(HTMLParserTreeBuilder, self).feed(markup) | |
File "/usr/local/Cellar/python/2.6.5/lib/python2.6/HTMLParser.py", line 108, in feed | |
self.goahead(0) | |
File "/usr/local/Cellar/python/2.6.5/lib/python2.6/HTMLParser.py", line 171, in goahead | |
self.handle_charref(name) | |
File "/usr/local/Cellar/python/2.6.5/lib/python2.6/site-packages/bs4/builder/_htmlparser.py", line 58, in handle_charref | |
self.handle_data(unichr(int(name))) | |
ValueError: invalid literal for int() with base 10: 'xBB' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment