Skip to content

Commit

Permalink
[FR- CNRWS] Workaround for old certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff2900 authored and joaopa00 committed Dec 22, 2024
1 parent 4ece247 commit f3e22fb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions resources/lib/channels/fr/cnews.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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']"):
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -153,15 +153,15 @@ 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)


@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:
Expand Down

0 comments on commit f3e22fb

Please sign in to comment.