scrapes spotify starting from an artist id, stores in sqlite
Project description
Spotiflite
Scrapes Spotify and dumps data to a sqlite3 database.
- Uses
requeststo make queries, with pythonic user-agent - sleeps randomly between each HTTP call
- is NOT in a hurry to get anywhere
- has nice 80's cli interface
Install
$ pip install spotiflite
then go somewhere and setup a database:
$ spotiflite setup
you can also specify the db filename:
$ spotiflite --spotifydb=this/awesome/db setup
Usage
For example scrape Frank ෴ Zappa
$ spotiflite scrape 6ra4GIOgCZQZMOaUECftGN
got 44 artist ids
extracted data for Tom Waits
saved data for Tom Waits
got 8 artist ids
extracted data for Elmer Snowden
saved data for Elmer Snowden
got 6 artist ids
extracted data for Wesley Willis
saved data for Wesley Willis
...
while its running you can get stats in another window
$ spotiflite stats
rows: 9882
completed: 1395
jobs to do: 8487
DB size: 48.04 MB
Cli usage
Usage: spotiflite.py [OPTIONS] COMMAND [ARGS]...
Options:
-db, --spotifydb TEXT sqlite filename [default: spotify.db]
--help Show this message and exit.
Commands:
scrape starts scraping from given artist id
setup creates tables
stats print out db stats
teardown deletes tables
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
spotiflite-0.0.3.tar.gz
(5.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spotiflite-0.0.3.tar.gz.
File metadata
- Download URL: spotiflite-0.0.3.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.7.5 Darwin/18.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c2a553add895d9fbc0aea3ced9b864a207b3b718617c04f6fb15d3a9fb952c0
|
|
| MD5 |
eb8f468bcc902b8b80eefb93bfcfe5d8
|
|
| BLAKE2b-256 |
f773abb232f9e27499b81f5754b1d525c0d06bffb35b7fbb15a342794920d661
|
File details
Details for the file spotiflite-0.0.3-py3-none-any.whl.
File metadata
- Download URL: spotiflite-0.0.3-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.7.5 Darwin/18.2.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4e9e7797feeb1f92abb73441a84592ebcc7ee3a622e348c9219495cf78a5456
|
|
| MD5 |
60b1da946154836b15569e141defab20
|
|
| BLAKE2b-256 |
fd0a58eb2ae2ab4a30fdaab4d3766414e3a4b776b65c7935d82b461ff3fcd514
|