Skip to main content

scrapes spotify starting from an artist id, stores in sqlite

Project description

Spotiflite

Build Status Latest Version

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 [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


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.2.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spotiflite-0.0.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file spotiflite-0.0.2.tar.gz.

File metadata

  • Download URL: spotiflite-0.0.2.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

Hashes for spotiflite-0.0.2.tar.gz
Algorithm Hash digest
SHA256 e412e1a026dd9995059a311fc1a626813b6473df927a83f0fae53b9fdebae236
MD5 c134c96578cf784e650df543c129518e
BLAKE2b-256 0e2ae9d1412e04588908cbb5eb08862dd3539e539a4646a83ebef8a88842b43d

See more details on using hashes here.

File details

Details for the file spotiflite-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: spotiflite-0.0.2-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

Hashes for spotiflite-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2a8f1e16160dea6c0b25172045872fd00d2cc583326214bbbe0ddeb3900d0c87
MD5 638385f0ed3729388e60234dca33a919
BLAKE2b-256 d5d3f9cbb425695293008e0fbd62a1b09459dcdf86dd260895ffd8fc374b33c3

See more details on using hashes here.

Supported by

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