Sat 23 May 2009 08:36:35 PM UTC, original submission:
I have >200k plays on last.fm. Using lastscrape.py takes a long time (obviously). Before all tracks can be scraped off the last.fm website the script will crash at a seemingly random point (each time about ~1 hour into running). I have tried 4 times now. I do not know how to further debug this.
example(s):
$ ./lastscrape.py superkuh lastfm_dump.txt
Trampled By Turtles Salvation 2009-05-23T13:58:36Z
...two hours pass...
Common Rider Rise or Fall 2007-10-18T23:15:42Z
Traceback (most recent call last):
File "./lastscrape.py", line 98, in <module>
sys.exit(main(*sys.argv))
File "./lastscrape.py", line 89, in main
for artist, track, timestamp in fetch_tracks(args[1]):
File "./lastscrape.py", line 75, in fetch_tracks
for artist, track, timestamp in tracks:
File "./lastscrape.py", line 34, in parse_page
for row in soup.find('table', 'candyStriped tracklist').findAll('tr'):
AttributeError: 'NoneType' object has no attribute 'findAll'
$ ls
-rw-r--r-- 1 superkuh superkuh 6.8M 2009-05-23 11:59 lastfm_dump.txt
$ ./lastscrape.py superkuh lastfm_dump2.txt
Trampled By Turtles Salvation 2009-05-23T13:58:36Z
...
The Raconteurs Consoler of the Lonely 2008-11-17T02:50:56Z
Traceback (most recent call last):
File "./lastscrape.py", line 98, in <module>
sys.exit(main(*sys.argv))
File "./lastscrape.py", line 89, in main
for artist, track, timestamp in fetch_tracks(args[1]):
File "./lastscrape.py", line 75, in fetch_tracks
for artist, track, timestamp in tracks:
File "./lastscrape.py", line 34, in parse_page
for row in soup.find('table', 'candyStriped tracklist').findAll('tr'):
AttributeError: 'NoneType' object has no attribute 'findAll'
$ ls
-rw-r--r-- 1 superkuh superkuh 2.1M 2009-05-23 12:46 lastfm_dump2.txt
|