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.
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
Release history Release notifications | RSS feed
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)
Built Distribution
Close
Hashes for lastpy-1.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38d0cef4f06f4296efb1e4f1ee93d00c94c70d813d5322aff19a528d8c4ef439 |
|
MD5 | 53caca469d7f2424bfe3c55f96ac8134 |
|
BLAKE2b-256 | 3a74958c08a63a5b93d072ff7ce06cabd29e27f4533d7fa5846458bc03cc22f5 |