Skip to content

Commit

Permalink
Remove wikia, seem to got deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonIT committed Sep 23, 2020
1 parent e6204f0 commit 8f91bfe
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 271 deletions.
2 changes: 1 addition & 1 deletion backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def __str__(self):


# With Sync. Not working: s._minilyrics, s._qq
SERVICES_LIST1 = [s._rentanadviser, s._syair, s._megalobiz, s._wikia]
SERVICES_LIST1 = [s._rentanadviser, s._syair, s._megalobiz]

# Without Sync.
SERVICES_LIST2 = [s._musixmatch, s._songmeanings, s._songlyrics, s._genius, s._versuri, s._azapi]
Expand Down
226 changes: 0 additions & 226 deletions lyrics.py

This file was deleted.

44 changes: 0 additions & 44 deletions services.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
from azapi import azapi
from bs4 import BeautifulSoup

import lyrics as minilyrics

try:
import spotify_lyric.crawlers.QQCrawler as QQCrawler
import spotify_lyric.model_traditional_conversion.langconv as langconv
Expand Down Expand Up @@ -57,30 +55,6 @@ def _local(song):
return lyrics, url, service_name, timed


def _minilyrics(song):
service_name = "Mini Lyrics"
url = ""
timed = False
try:
data = minilyrics.MiniLyrics(song.artist, song.name)
for item in data:
if item['url'].endswith(".lrc"):
url = item['url']
break
lyrics = requests.get(url, proxies=Config.PROXY).text
timed = True
except Exception as error:
print("%s: %s" % (service_name, error))
lyrics = Config.ERROR
if url == "":
lyrics = Config.ERROR
if song.artist.lower().replace(" ", "") not in lyrics.lower().replace(" ", ""):
lyrics = Config.ERROR
timed = False

return lyrics, url, service_name, timed


def _rentanadviser(song):
service_name = "RentAnAdviser"
url = ""
Expand Down Expand Up @@ -167,24 +141,6 @@ def _qq(song):
return lrc_string, url, qq.name, True


def _wikia(song):
service_name = "Wikia"
url = ""
timed = False
try:
lyrics, url, timed = minilyrics.LyricWikia(song.artist, song.name)
except Exception as error:
print("%s: %s" % (service_name, error))
lyrics = Config.ERROR
if "TrebleClef.png" in lyrics:
lyrics = "(Instrumental)"
if "Instrumental" in lyrics:
lyrics = "(Instrumental)"
if lyrics == "error":
lyrics = Config.ERROR
return lyrics, url, service_name, timed


def _syair(song):
service_name = "Syair"
url = ""
Expand Down

0 comments on commit 8f91bfe

Please sign in to comment.