Upload files to 'anime_scripts'

This commit is contained in:
marios8543 2020-04-25 21:31:29 +03:00
parent f2c7d70878
commit b652d20591

View File

@ -75,8 +75,6 @@ def get_show(id):
return response.json()
raise ValueError("Bad show")
items = []
def get_base_show(res):
base = res["data"]["Media"]
return SortableAnime(base["id"], base["startDate"]["year"], "BASE", base["title"], base["format"])
@ -89,7 +87,9 @@ def process_shows(res):
pass
return ls
show_id = search(argv[1])
def main(query):
items = []
show_id = search(query)
res = get_show(show_id)
items.extend(process_shows(res))
base_show = get_base_show(res)
@ -111,5 +111,7 @@ else:
items = [i for i in items if i.frmt == "TV"]
items.sort(key=lambda i: i.year)
season = items.index(base_show)+1
return season
print("Season {}".format(season))
if __name__ == "__main__":
print("Season {}".format(main(argv[1])))