aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/tvopengr.py
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-12-01 23:33:30 +0800
committerJesús <heckyel@hyperbola.info>2022-12-01 23:33:30 +0800
commitef1a420d6de7876b7b6732abc8ab78351c5a2bfc (patch)
tree9ba7d8409aa5baa696f5fb10db5d395c2f050276 /yt_dlp/extractor/tvopengr.py
parent16e8548f6a720a78679e417a20a300db2036bf6c (diff)
parentddf1e22d48530819d60220d0bdc36e20f5b8483b (diff)
downloadhypervideo-pre-ef1a420d6de7876b7b6732abc8ab78351c5a2bfc.tar.lz
hypervideo-pre-ef1a420d6de7876b7b6732abc8ab78351c5a2bfc.tar.xz
hypervideo-pre-ef1a420d6de7876b7b6732abc8ab78351c5a2bfc.zip
update from upstream 2022-12-01 UTC+8
Diffstat (limited to 'yt_dlp/extractor/tvopengr.py')
-rw-r--r--yt_dlp/extractor/tvopengr.py11
1 files changed, 1 insertions, 10 deletions
diff --git a/yt_dlp/extractor/tvopengr.py b/yt_dlp/extractor/tvopengr.py
index aded261f3..e208e57f2 100644
--- a/yt_dlp/extractor/tvopengr.py
+++ b/yt_dlp/extractor/tvopengr.py
@@ -1,11 +1,8 @@
-import re
-
from .common import InfoExtractor
from ..utils import (
determine_ext,
get_elements_text_and_html_by_attribute,
scale_thumbnails_to_max_format_width,
- unescapeHTML,
)
@@ -72,7 +69,6 @@ class TVOpenGrWatchIE(TVOpenGrBaseIE):
continue
formats.extend(formats_)
self._merge_subtitles(subs_, target=subs)
- self._sort_formats(formats)
return formats, subs
def _real_extract(self, url):
@@ -98,7 +94,7 @@ class TVOpenGrEmbedIE(TVOpenGrBaseIE):
IE_NAME = 'tvopengr:embed'
IE_DESC = 'tvopen.gr embedded videos'
_VALID_URL = r'(?:https?:)?//(?:www\.|cdn\.|)(?:tvopen|ethnos).gr/embed/(?P<id>\d+)'
- _EMBED_RE = re.compile(rf'''<iframe[^>]+?src=(?P<_q1>["'])(?P<url>{_VALID_URL})(?P=_q1)''')
+ _EMBED_REGEX = [rf'''<iframe[^>]+?src=(?P<_q1>["'])(?P<url>{_VALID_URL})(?P=_q1)''']
_TESTS = [{
'url': 'https://cdn.ethnos.gr/embed/100963',
@@ -115,11 +111,6 @@ class TVOpenGrEmbedIE(TVOpenGrBaseIE):
},
}]
- @classmethod
- def _extract_urls(cls, webpage):
- for mobj in cls._EMBED_RE.finditer(webpage):
- yield unescapeHTML(mobj.group('url'))
-
def _real_extract(self, url):
video_id = self._match_id(url)
return self._return_canonical_url(url, video_id)