scrapes spotify starting from an artist id, stores in sqlite
Project description
Spotiflite
Scrapes Spotify and dumps data to a sqlite3 database.
- Uses
requests
to 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
--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.1.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for spotiflite-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0cbca6e40fed2c5d4a1c1bf7c634b23989f9a19d6e3525542e855efe30587c09 |
|
MD5 | f717bff91d2a55b165b43d47aba2bb96 |
|
BLAKE2b-256 | a44e028d7c706a7836f3c1034d6a81475877fc1e0cb6cf7a54e8d6952c3ff9ac |