From f3e22fbab62f96c809809976ed93962623533108 Mon Sep 17 00:00:00 2001 From: jeff2900 <23429848+jeff2900@users.noreply.github.com> Date: Sat, 21 Dec 2024 22:18:37 -1000 Subject: [PATCH] [FR- CNRWS] Workaround for old certificates --- resources/lib/channels/fr/cnews.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/resources/lib/channels/fr/cnews.py b/resources/lib/channels/fr/cnews.py index 83ec85d3e..96af49fdb 100644 --- a/resources/lib/channels/fr/cnews.py +++ b/resources/lib/channels/fr/cnews.py @@ -56,7 +56,7 @@ def list_categories(plugin, item_id, **kwargs): @Route.register def list_videos(plugin, item_id, category_url, page, **kwargs): - resp = urlquick.get(category_url % page, headers=GENERIC_HEADERS, max_age=-1) + resp = urlquick.get(category_url % page, headers=GENERIC_HEADERS, verify=False, max_age=-1) parser = htmlement.HTMLement() parser.feed(resp.json()) data = parser.close() @@ -82,7 +82,7 @@ def get_video_id(plugin, video_id, download_mode=False, **kwargs): @Route.register def list_emissions(plugin, item_id, category_url, page, **kwargs): - resp = urlquick.get(URL_REPLAY_CNEWS, headers=GENERIC_HEADERS, max_age=-1) + resp = urlquick.get(URL_REPLAY_CNEWS, headers=GENERIC_HEADERS, verify=False, max_age=-1) data = resp.parse("div", attrs={"class": "les-emissions"}) for video_datas in data.iterfind(".//a[@class='emission-item-wrapper']"): @@ -121,7 +121,7 @@ def list_emissions_old(plugin, item_id, category_url, page, **kwargs): @Route.register def list_videos_emission(plugin, item_id, video_url, **kwargs): - resp = urlquick.get(video_url, headers=GENERIC_HEADERS, max_age=-1) + resp = urlquick.get(video_url, headers=GENERIC_HEADERS, verify=False, max_age=-1) root = resp.parse() info = root.findall(".//p")[0].text @@ -153,7 +153,7 @@ def list_videos_emission(plugin, item_id, video_url, **kwargs): @Resolver.register def get_video_url(plugin, item_id, video_url, download_mode=False, **kwargs): - root = urlquick.get(video_url, headers=GENERIC_HEADERS, max_age=-1).parse() + root = urlquick.get(video_url, headers=GENERIC_HEADERS, verify=False, max_age=-1).parse() video_id = root.find(".//div[@id='embed-main-video']").get('data-videoid') return resolver_proxy.get_stream_dailymotion(plugin, video_id, download_mode) @@ -161,7 +161,7 @@ def get_video_url(plugin, item_id, video_url, download_mode=False, **kwargs): @Resolver.register def get_live_url(plugin, item_id, **kwargs): - root = urlquick.get(URL_LIVE_CNEWS, headers=GENERIC_HEADERS, max_age=-1).parse() + root = urlquick.get(URL_LIVE_CNEWS, headers=GENERIC_HEADERS, verify=False, max_age=-1).parse() try: live_id = root.find(".//div[@data-muted='true']").get('data-videoid') except Exception: