Skip to content

Commit

Permalink
Fix status bug.
Browse files Browse the repository at this point in the history
Fix log level of uvicorn access.
  • Loading branch information
EstrellaXD committed May 11, 2023
1 parent fb6414f commit 5348211
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 38 deletions.
1 change: 0 additions & 1 deletion src/module/core/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ def check_status() -> bool:
return False



def check_downloader():
with DownloadClient() as client:
if client.authed:
Expand Down
25 changes: 0 additions & 25 deletions src/module/core/download_fliter.py

This file was deleted.

25 changes: 13 additions & 12 deletions src/module/parser/analyser/bgm_parser.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
from module.network import RequestContent


class BgmAPI:
def __init__(self):
self.search_url = lambda e: f"https://api.bgm.tv/search/subject/{e}?type=2"
self.info_url = lambda e: f"https://api.bgm.tv/subject/{e}"

def search(self, title):
url = self.search_url(title)
with RequestContent() as req:
contents = req.get_json(url)["list"]
if contents.__len__() == 0:
return None
return contents[0]["name"], contents[0]["name_cn"]
search_url = lambda e: \
f"https://api.bgm.tv/search/subject/{e}?responseGroup=large"


def bgm_parser(title):
url = search_url(title)
with RequestContent() as req:
contents = req.get_json(url)
if contents:
return contents[0]
else:
return None

0 comments on commit 5348211

Please sign in to comment.