librefm-bugs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Librefm-bugs] [bug #32936] lastscrape: BeautifulSoup fails to parse las


From: Petr Viktorin
Subject: [Librefm-bugs] [bug #32936] lastscrape: BeautifulSoup fails to parse last.fm pages
Date: Mon, 28 Mar 2011 13:16:45 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Ubuntu/10.10 Chromium/10.0.648.133 Chrome/10.0.648.133 Safari/534.16

URL:
  <http://savannah.gnu.org/bugs/?32936>

                 Summary: lastscrape: BeautifulSoup fails to parse last.fm
pages
                 Project: GNU FM
            Submitted by: encukou
            Submitted on: Mon 28 Mar 2011 01:16:45 PM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Apparently, last.fm made a subtle change to their pages that prevents
BeautifulSoup from parsing the scrobbles correctly.

librefm/trunk/lastscrape$ ./lastscrape.py encukou lastfm_dump.txt
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'

(on a side note, BeautifulSoup 3.2 has been out for some while; it might make
sense to tell users to use that instead of the 3.0.7a if it's made to work)




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?32936>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]