Check for missing catchupInfo
Signed-off-by: Markus Birth <markus@birth-online.de>
This commit is contained in:
+10
@@ -26,6 +26,10 @@ def getPageProps(url):
|
|||||||
|
|
||||||
main_props = getPageProps(START_URL)
|
main_props = getPageProps(START_URL)
|
||||||
|
|
||||||
|
if not "catchupInfo" in main_props:
|
||||||
|
print("[bold red]Error: No catchupInfo in starting URL. Check whether this URL is correct:")
|
||||||
|
print(f"[bold cyan][url={START_URL}]{START_URL}")
|
||||||
|
|
||||||
shows = main_props["catchupInfo"]
|
shows = main_props["catchupInfo"]
|
||||||
shows_done = 0
|
shows_done = 0
|
||||||
|
|
||||||
@@ -69,6 +73,12 @@ with Progress(
|
|||||||
show_props = getPageProps(show_url)
|
show_props = getPageProps(show_url)
|
||||||
#print(show_props)
|
#print(show_props)
|
||||||
|
|
||||||
|
if not "catchupInfo" in show_props:
|
||||||
|
print(f"[bold red]Error: No catch up info for [bold magenta]{title}")
|
||||||
|
shows_done += 1
|
||||||
|
prog.update(task_show, completed=shows_done)
|
||||||
|
continue
|
||||||
|
|
||||||
episodes = show_props["catchupInfo"]["episodes"]
|
episodes = show_props["catchupInfo"]["episodes"]
|
||||||
episodes_done = 0
|
episodes_done = 0
|
||||||
prog.start_task(task_epi)
|
prog.start_task(task_epi)
|
||||||
|
|||||||
Reference in New Issue
Block a user