Code Monkey home page Code Monkey logo

youtubetospotify's Introduction

Hi there

youtubetospotify's People

Contributors

piyx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

youtubetospotify's Issues

'prompt_for_user_token' is deprecated.

'prompt_for_user_token' is deprecated.

error is:

            You need to set your Spotify API credentials.
            You can do this by setting environment variables like so:

            export SPOTIPY_CLIENT_ID='your-spotify-client-id'
            export SPOTIPY_CLIENT_SECRET='your-spotify-client-secret'
            export SPOTIPY_REDIRECT_URI='your-app-redirect-url'

            Get your credentials at
                https://developer.spotify.com/my-applications

Traceback (most recent call last):
File "D:\Users\yitzh\Desktop\YoutubeToSpotify-master\main.py", line 29, in
main()
File "D:\Users\yitzh\Desktop\YoutubeToSpotify-master\main.py", line 10, in main
spotify_playlist_id = sp.create_playlist(spotify_playlist_name)
File "D:\Users\yitzh\Desktop\YoutubeToSpotify-master\spotify.py", line 48, in create_playlist
"Authorization": f"Bearer {self.spotify.token}"
File "D:\Users\yitzh\Desktop\YoutubeToSpotify-master\spotify.py", line 21, in token
return util.prompt_for_user_token(
File "D:\Users\yitzh\Desktop\YoutubeToSpotify-master\venv\lib\site-packages\spotipy\util.py", line 80, in prompt_for_user_token
raise spotipy.SpotifyException(550, -1, "no credentials set")
spotipy.exceptions.SpotifyException: http status: 550, code:-1 - no credentials set, reason: None

credentials were set in .env.sample
would appreciate any help!

Crashes - Error: Couldn't find "tracks" in get_song_uri function

Just tried adding my YouTube playlist to Spotify but the program kept crashing at a certain song.
Due to tracks not being found.

My Playlist ID: PLIC0u39_FdlMOtIwmwMNimn4r35Wy2Pc6

StackTrace

Traceback (most recent call last): File "C:\youtubetospotify-master\main.py", line 21, in <module> main() File "C:\youtubetospotify-master\main.py", line 14, in main song_uri = sp.get_song_uri(song.artist, song.title) File "C:\youtubetospotify-master\spotify.py", line 67, in get_song_uri items = results['tracks']['items'] KeyError: 'tracks'

Quick fix:

Added try, except block inside get_song_uri function

Not working

PS C:\Users\Matheus\Documents\YoutubeToSpotify-master> python main.py
Traceback (most recent call last):
  File "C:\Users\Matheus\Documents\YoutubeToSpotify-master\main.py", line 29, in <module>
    main()
  File "C:\Users\Matheus\Documents\YoutubeToSpotify-master\main.py", line 6, in main
    yt = Youtube()
  File "C:\Users\Matheus\Documents\YoutubeToSpotify-master\youtube.py", line 35, in __init__
    self.youtube = build(
  File "C:\Users\Matheus\AppData\Local\Programs\Python\Python310\lib\site-packages\googleapiclient\_helpers.py", line 134, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "C:\Users\Matheus\AppData\Local\Programs\Python\Python310\lib\site-packages\googleapiclient\discovery.py", line 278, in build
    service = build_from_document(
  File "C:\Users\Matheus\AppData\Local\Programs\Python\Python310\lib\site-packages\googleapiclient\_helpers.py", line 134, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "C:\Users\Matheus\AppData\Local\Programs\Python\Python310\lib\site-packages\googleapiclient\discovery.py", line 527, in build_from_document
    credentials = _auth.default_credentials(
  File "C:\Users\Matheus\AppData\Local\Programs\Python\Python310\lib\site-packages\googleapiclient\_auth.py", line 54, in default_credentials
    credentials, _ = google.auth.default(scopes=scopes, quota_project_id=quota_project_id)
  File "C:\Users\Matheus\AppData\Local\Programs\Python\Python310\lib\site-packages\google\auth\_default.py", line 488, in default
    raise exceptions.DefaultCredentialsError(_HELP_MESSAGE)
google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials. Please set GOOGLE_APPLICATION_CREDENTIALS or explicitly create credentials and re-run the application. For more information, please see https://cloud.google.com/docs/authentication/getting-started
PS C:\Users\Matheus\Documents\YoutubeToSpotify-master>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.