From: James Bunton Date: Sun, 12 Apr 2020 07:36:57 +0000 (+1000) Subject: fix #105 - channel 10 pulling in too many episodes X-Git-Url: https://code.delx.au/webdl/commitdiff_plain/cc6d633093c3bdfb2524841575628b17970a77f2?ds=sidebyside;hp=97570a4cba4ce64c2c3062e4b440c0aa24658a63 fix #105 - channel 10 pulling in too many episodes --- diff --git a/ten.py b/ten.py index 557b673..e3622e4 100644 --- a/ten.py +++ b/ten.py @@ -1,6 +1,6 @@ from common import grab_json, download_hls, Node, append_to_qs -SERIES_LIST_URL = "https://vod.ten.com.au/config/android-v2" +SERIES_LIST_URL = "https://vod.ten.com.au/config/android-v4" SERIES_DETAIL_URL = "https://v.tenplay.com.au/api/videos/bcquery" class TenVideoNode(Node): @@ -22,17 +22,9 @@ class TenSeriesNode(Node): self.video_ids = set() def fill_children(self): - self.fill_children_with_query(self.query) - - if "&none" not in self.query: - # Some videos are not categorised correctly, so try looking up by the cleanname as well. - # Only do this if they haven't tried to filter out similarly named shows. - self.fill_children_with_query("&all=tv_show_group:" + self.clean_name) - - def fill_children_with_query(self, query): page_number = 0 while page_number < 100: - url = self.get_page_url(query, page_number) + url = self.get_page_url(self.query, page_number) page_number += 1 page = grab_json(url) @@ -68,7 +60,7 @@ class TenRootNode(Node): for series in doc["Browse TV"]["Shows"]: title = series["title"] - query = series["query"] + query = series["query"] + series["episodefilter"] clean_name = series["cleanname"] TenSeriesNode(title, self, query, clean_name)