mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
Update vndb.py
This commit is contained in:
parent
5309dfed0a
commit
bea1ceb83a
@ -138,32 +138,22 @@ def getvidbytitle_release(title):
|
||||
)
|
||||
|
||||
|
||||
def getdevelopersbyid(vid):
|
||||
def getdevelopersbyid(vid):
|
||||
|
||||
def _js(js):
|
||||
_ = []
|
||||
for item in js["results"][0]["developers"]:
|
||||
if item["original"]:
|
||||
_.append(item["original"])
|
||||
return _
|
||||
|
||||
origin = safegetvndbjson(
|
||||
"https://api.vndb.org/kana/vn",
|
||||
{"filters": ["id", "=", vid], "fields": "developers.original"},
|
||||
_js,
|
||||
)
|
||||
|
||||
def _js(js):
|
||||
_ = []
|
||||
for item in js["results"][0]["developers"]:
|
||||
_.append(item["name"])
|
||||
return _
|
||||
|
||||
name = safegetvndbjson(
|
||||
"https://api.vndb.org/kana/vn",
|
||||
{"filters": ["id", "=", vid], "fields": "developers.name"},
|
||||
{"filters": ["id", "=", vid], "fields": "developers.name,developers.origin"},
|
||||
_js,
|
||||
)
|
||||
return name + origin
|
||||
return name
|
||||
|
||||
|
||||
def getvidbytitle(title):
|
||||
|
Loading…
x
Reference in New Issue
Block a user