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