aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/videopress.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/videopress.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/videopress.py')
-rw-r--r--yt_dlp/extractor/videopress.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/yt_dlp/extractor/videopress.py b/yt_dlp/extractor/videopress.py
index 3c5e27a9d..0734aee9c 100644
--- a/yt_dlp/extractor/videopress.py
+++ b/yt_dlp/extractor/videopress.py
@@ -1,5 +1,3 @@
-import re
-
from .common import InfoExtractor
from ..utils import (
determine_ext,
@@ -17,6 +15,7 @@ class VideoPressIE(InfoExtractor):
_ID_REGEX = r'[\da-zA-Z]{8}'
_PATH_REGEX = r'video(?:\.word)?press\.com/embed/'
_VALID_URL = r'https?://%s(?P<id>%s)' % (_PATH_REGEX, _ID_REGEX)
+ _EMBED_REGEX = [rf'<iframe[^>]+src=["\'](?P<url>(?:https?://)?{_PATH_REGEX}{_ID_REGEX})']
_TESTS = [{
'url': 'https://videopress.com/embed/kUJmAcSf',
'md5': '706956a6c875873d51010921310e4bc6',
@@ -39,12 +38,6 @@ class VideoPressIE(InfoExtractor):
'only_matching': True,
}]
- @staticmethod
- def _extract_urls(webpage):
- return re.findall(
- r'<iframe[^>]+src=["\']((?:https?://)?%s%s)' % (VideoPressIE._PATH_REGEX, VideoPressIE._ID_REGEX),
- webpage)
-
def _real_extract(self, url):
video_id = self._match_id(url)
@@ -83,7 +76,6 @@ class VideoPressIE(InfoExtractor):
'width': int_or_none(video.get('width')),
'height': int_or_none(video.get('height')),
})
- self._sort_formats(formats)
return {
'id': video_id,