mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-12-08 20:39:08 +00:00
printing lyrics now works
This commit is contained in:
@@ -45,6 +45,8 @@ def searchYT(number):
|
|||||||
#print(full_link)
|
#print(full_link)
|
||||||
global video
|
global video
|
||||||
video = pafy.new(full_link)
|
video = pafy.new(full_link)
|
||||||
|
global raw_title
|
||||||
|
raw_title = (video.title).encode("utf-8")
|
||||||
global title
|
global title
|
||||||
title = ((video.title).replace("\\", "_").replace("/", "_").replace(":", "_").replace("*", "_").replace("?", "_").replace('"', "_").replace("<", "_").replace(">", "_").replace("|", "_").replace(" ", "_")).encode('utf-8')
|
title = ((video.title).replace("\\", "_").replace("/", "_").replace(":", "_").replace("*", "_").replace("?", "_").replace('"', "_").replace("<", "_").replace(">", "_").replace("|", "_").replace(" ", "_")).encode('utf-8')
|
||||||
if not number == None:
|
if not number == None:
|
||||||
@@ -81,9 +83,9 @@ def checkExists(islist):
|
|||||||
def getLyrics():
|
def getLyrics():
|
||||||
if not title == '':
|
if not title == '':
|
||||||
if song == '':
|
if song == '':
|
||||||
link = 'https://duckduckgo.com/html/?q=' + title.replace(' ', '+') + '+musixmatch'
|
link = 'https://duckduckgo.com/html/?q=' + raw_title.replace(' ', '+') + '+musixmatch'
|
||||||
else:
|
else:
|
||||||
link = 'https://duckduckgo.com/html/?q=' + song.replace(' ', '+') + '+musixmatch'
|
link = 'https://duckduckgo.com/html/?q=' + (content['artists'][0]['name'] + ' - ' + content['name']).replace(' ', '+') + '+musixmatch'
|
||||||
loadMechanize()
|
loadMechanize()
|
||||||
page = br.open(link)
|
page = br.open(link)
|
||||||
page = page.read()
|
page = page.read()
|
||||||
|
|||||||
Reference in New Issue
Block a user