Skip to main content

Parse Spotify URI to youtube link

Project description

Parse Spotify URI to Youtube link

Installation

Just use (No other package is needed):

$ pip install sp_yt_search

Example Usage

from sp_yt_search import SpYt


if __name__ == '__main__':
    # Setup credentials
    client_id = 'spotify_api_client_id'
    secret = 'spotify_api_secret'
    # Provide Spotify URI
    uri = 'spotify:track:4uLU6hMCjMI75M1A2tKUQC'

    sp = SpYt()                             # Initialize SpYt object
    sp.set_credentials(client_id, secret)   # Auth Spotify

    sp.sp_search(uri)                       # Search for URI
    print(sp.get_data())                    # Prints found spotify objects

    sp.yt_search()                          # Perform YT search for found Spotify objects
    print(sp.get_data())                    # Prints spotify objects with YouTube related results

Availible URIs

Package can be used for fetching:

  • Track:

    spotify:track:{ID}
  • Playlist:

    spotify:playlist:{ID}
  • Album:

    spotify:album:{ID}
  • Artist:

    spotify:artist:{id}}

See me on github

License MIT

Free Software, Hell Yeah!

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

sp_yt_search-1.1.0.tar.gz (7.7 kB view hashes)

Uploaded Source

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