calliope.lastfm.lastexport
¶
Script for exporting tracks through audioscrobbler API. Usage: lastexport.py -u USER [-o OUTFILE] [-p STARTPAGE] [-s SERVER]
Module Contents¶
Functions¶
|
Define command line options. |
|
Connect to server and get a XML page. |
|
Check how many pages of tracks and total tracks the user has. |
|
Read XML page and get a list of tracks and their info. |
|
Extract info from every track entry and output to list. |
|
Write tracks to an open file |
|
|
|
Attributes¶
- calliope.lastfm.lastexport.__version__ = 0.0.4¶
- calliope.lastfm.lastexport.get_options(parser)¶
Define command line options.
- calliope.lastfm.lastexport.connect_server(server, username, startpage, sleep_func=time.sleep, tracktype='recenttracks', retry_on_error=True)¶
Connect to server and get a XML page.
- calliope.lastfm.lastexport.get_pageinfo(response, tracktype='recenttracks')¶
Check how many pages of tracks and total tracks the user has.
- calliope.lastfm.lastexport.get_tracklist(response)¶
Read XML page and get a list of tracks and their info.
- calliope.lastfm.lastexport.parse_track(trackelement)¶
Extract info from every track entry and output to list.
- calliope.lastfm.lastexport.write_tracks(tracks, outfileobj)¶
Write tracks to an open file
- calliope.lastfm.lastexport.get_tracks(server, username, startpage=1, sleep_func=time.sleep, tracktype='recenttracks', retry_on_error=True)¶
- calliope.lastfm.lastexport.main(server, username, startpage, outfile, infotype='recenttracks')¶
- calliope.lastfm.lastexport.parser¶