Skip to main content

A straightforward utility for scrobbling tracks to last.fm

Project description

# Last.fm Python Scrobbler

This is a lightweight script that can easily integrate with other applications
to provide scrobbling capabilities for any service.

## Setup
* First `git clone https://github.com/huberf/lastfm-scrobbler`
* Make sure you have the `requests` library installed.
* Create the environment variable `LAST_FM_API` and `LAST_FM_API_SECRET` with your [Last.fm API
Key](http://www.last.fm/api/authentication)
* Now everything is ready and you simply have to include this file in your
program and call the `authorize` or `scrobble` functions.


## Get user auth token
* Go to http://www.last.fm/api/auth?api_key={YOUR_API_KEY}&cb=http://localhost:5555
* Make sure nothing is running at port 5555, as we will be manually retreiving
the token.
* Click "Allow Access"
* Now copy the token from the resulting url (e.g.
`http://localhost:5555/?token={TOKEN_YOU_WANT}`)
* Now run the `authorize` function in this library with this token as the
parameter.
* Profit?

## Scrobbling
* Import 'lastfm' into any project you want, and run the 'scrobble' function
supplying the song name, artist name, and user auth token. The library will
handle the rest.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lastpy-1.0.2.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

lastpy-1.0.2-py2.py3-none-any.whl (3.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page