Комментарии:
Very clear. Thanks for linking to the code
ОтветитьDope you are helping me learn a lot!
Ответитьquick question have you used any other modules apart from BeautifulSoup ?
ОтветитьVery nice, where are the rest of the videos?
ОтветитьThank you! Just followed along and got this to work with about 2 seconds of previous Python experience. Great lay man's explanations of what each line is doing.
ОтветитьWould love to see this updated to python 3.x. I know there are only minor differences but for someone learning it makes it difficult to dig thru tutorials in hopes that their 3.x syntax works using 2.x tutorials. I am also very curious as to why python 2.x is still so prevelent. I know some large projects and OS's (RHEL, etc) have both and still rely heavily on python 2 but what are you thoughts on why the addoption is so slow to python3? Trying to pick up a new language where folks still use an old version which very different in some respects can be frustrating at times.
Ответитьnot sure if this is a new thing or it's just me
but I've recently tried this again and got a ton of errors
it worked when i changed the following line:
col = row.findAll('td') and changed it to....
col = row.findAll('td', {'class' : 'playertablePlayerName'})
I am getting an error on line 11 of the code:
for row in tableStats.findAll('tr')[2:]:
the error message is:
Traceback (most recent call last):
File "ESPN_Mine.py", line 11, in <module>
for row in tableStats.findAll('tr')[2:]:
AttributeError: 'NoneType' object has no attribute 'findAll'
Is there any reason for this?
I had difficulties with this.
1) The screen clarity is poor, so hard to be sure what was being typed. } versus ) or : versus ; for instance.
2) I'm using Python 3.5 Apparantly, this vidoe was done in Python 2. Some commands are different.
import urllib2 is now import urllib
urllib2.urlopen is now urllib.request.urlopen
3) I changed 'html' to 'html5lib'
Note: I installed html5lib first.
4) I changed [2:] to [2] to see what would happen out of curiosity. I got errors. I would like to know more on this.
5) It balked at one of my lines being indented differently. Picky.
Other than that, thanks. I got through it. It was very helpful.
Thanks for this awesome tutorial !
Ответитьwrr
ОтветитьFantastic Joe. It's a practical example helpful in ways that the BSoup documentation isn't.
ОтветитьHi Joe, Very nice video! You mentioned a demo code, but the link seems to not work. Would be great to have it.
Ответитьfor row in tableStats.findAll('tr')[2:]:
AttributeError: 'NoneType' object has no attribute 'findAll'
how to deal this error? Can some one help me out?
Anyone done this on NFL.com? Trying to scrape each players profile. Any help would be appreciated!
Ответитьthe demo code is not working
Ответить