Skip to content

Commit

Permalink
[FR - CNEWS] Fix live for old certificates
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopa00 committed Feb 7, 2025
1 parent 037fb62 commit 98badd5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions resources/lib/channels/fr/cnews.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,13 @@ def get_video_url(plugin, item_id, video_url, download_mode=False, **kwargs):

@Resolver.register
def get_live_url(plugin, item_id, **kwargs):
if URLLIB3_VERSION == "2.2.3":
url_req = Request(URL_LIVE_CNEWS, headers=GENERIC_HEADERS, method='GET')
root = urlopen(url_req).read().decode('utf8')
else:
root = urlquick.get(URL_LIVE_CNEWS, headers=GENERIC_HEADERS, verify=False, max_age=-1).parse()

try:
if URLLIB3_VERSION == "2.2.3":
url_req = Request(URL_LIVE_CNEWS, headers=GENERIC_HEADERS, method='GET')
root = urlopen(url_req).read().decode('utf8')
else:
resp = urlquick.get(URL_LIVE_CNEWS, headers=GENERIC_HEADERS, verify=False, max_age=-1)
root =resp.pars()

Check failure on line 204 in resources/lib/channels/fr/cnews.py

View workflow job for this annotation

GitHub Actions / Flake8

resources/lib/channels/fr/cnews.py#L204

Missing whitespace around operator (E225)
live_id = root.find(".//div[@data-muted='true']").get('data-videoid')
except Exception:
live_id = 'x3b68jn'
Expand Down

0 comments on commit 98badd5

Please sign in to comment.