Some small fixes

This commit is contained in:
Ritiek
2017-06-15 14:48:22 +05:30
parent 8cf7d96fc8
commit 8c89da5ccf
2 changed files with 38 additions and 41 deletions

View File

@@ -1,6 +1,7 @@
import argparse
import sys
import os
import spotipy.oauth2 as oauth2
def input_link(links):
while True:
@@ -55,6 +56,14 @@ def is_spotify(raw_song):
else:
return False
def generate_token():
# Please respect this user token :)
creds = oauth2.SpotifyClientCredentials(
client_id='4fe3fecfe5334023a1472516cc99d805',
client_secret='0f02b7c483c04257984695007a4a8d5c')
token = creds.get_access_token()
return token
def generate_search_URL(song):
URL = "https://www.youtube.com/results?sp=EgIQAQ%253D%253D&q=" + \
song.replace(" ", "%20")