aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/shemaroome.py
diff options
context:
space:
mode:
authorAshish Gupta <39122144+Ashish0804@users.noreply.github.com>2021-11-30 21:44:47 +0530
committerGitHub <noreply@github.com>2021-11-30 21:44:47 +0530
commit73f035e1feba7261d719b77e24b9fa3da93b9ecf (patch)
tree78f1769b7fcf17f64b2865b63c9d4a9d2e8ae8c9 /yt_dlp/extractor/shemaroome.py
parent0cbed930c8f5b14500557b689c754b9ad0c0436a (diff)
downloadhypervideo-pre-73f035e1feba7261d719b77e24b9fa3da93b9ecf.tar.lz
hypervideo-pre-73f035e1feba7261d719b77e24b9fa3da93b9ecf.tar.xz
hypervideo-pre-73f035e1feba7261d719b77e24b9fa3da93b9ecf.zip
[Cleanup] Remove some unnecessary groups in regexes (#1738)
Authored by: Ashish0804
Diffstat (limited to 'yt_dlp/extractor/shemaroome.py')
-rw-r--r--yt_dlp/extractor/shemaroome.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/yt_dlp/extractor/shemaroome.py b/yt_dlp/extractor/shemaroome.py
index 142d5dc3a..00a5b00cd 100644
--- a/yt_dlp/extractor/shemaroome.py
+++ b/yt_dlp/extractor/shemaroome.py
@@ -16,7 +16,7 @@ from ..utils import (
class ShemarooMeIE(InfoExtractor):
- _VALID_URL = r'(?:https?://)(?:www\.)?shemaroome\.com/(?:movies|shows)/(?P<id>[^?#]+)'
+ _VALID_URL = r'https?://(?:www\.)?shemaroome\.com/(?:movies|shows)/(?P<id>[^?#]+)'
_TESTS = [{
'url': 'https://www.shemaroome.com/movies/dil-hai-tumhaara',
'info_dict': {
@@ -78,7 +78,7 @@ class ShemarooMeIE(InfoExtractor):
iv = [0] * 16
m3u8_url = intlist_to_bytes(aes_cbc_decrypt(url_data, key, iv))
m3u8_url = m3u8_url[:-compat_ord((m3u8_url[-1]))].decode('ascii')
- formats = self._extract_m3u8_formats(m3u8_url, video_id, fatal=False, headers={'stream_key': data_json['stream_key']})
+ formats, m3u8_subs = self._extract_m3u8_formats_and_subtitles(m3u8_url, video_id, fatal=False, headers={'stream_key': data_json['stream_key']})
self._sort_formats(formats)
release_date = self._html_search_regex(
@@ -91,6 +91,7 @@ class ShemarooMeIE(InfoExtractor):
subtitles.setdefault('EN', []).append({
'url': self._proto_relative_url(sub_url),
})
+ subtitles = self._merge_subtitles(subtitles, m3u8_subs)
description = self._html_search_regex(r'(?s)>Synopsis(</.+?)</', webpage, 'description', fatal=False)
return {