add "live" property to episodes
This commit is contained in:
parent
47b27f0f0e
commit
18a6f20d71
1 changed files with 6 additions and 2 deletions
|
|
@ -145,8 +145,12 @@ def parse_search_result(data, search_result_types, result_type, category):
|
|||
|
||||
if result_type in ["episode"]:
|
||||
flex_item = get_flex_column_item(data, 1)
|
||||
search_result["date"] = nav(flex_item, TEXT_RUN_TEXT)
|
||||
search_result["podcast"] = parse_id_name(nav(flex_item, ["text", "runs", 2]))
|
||||
has_date = int(len(nav(flex_item, TEXT_RUNS)) > 1)
|
||||
search_result["live"] = bool(nav(data, ["badges", 0, "liveBadgeRenderer"], True))
|
||||
if has_date:
|
||||
search_result["date"] = nav(flex_item, TEXT_RUN_TEXT)
|
||||
|
||||
search_result["podcast"] = parse_id_name(nav(flex_item, ["text", "runs", has_date * 2]))
|
||||
|
||||
search_result["thumbnails"] = nav(data, THUMBNAILS, True)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue