aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMinePlayersPE <mineplayerspealt@gmail.com>2022-01-01 13:12:33 +0700
committerGitHub <noreply@github.com>2022-01-01 11:42:33 +0530
commit8efffafa532e9e2c25765c596c0e1a84e86102e1 (patch)
treeabfe168710c14b147f4b5e92bc1544505ff34140
parent26f2aa3db96cf44764d69b32db78b7a48752a016 (diff)
downloadhypervideo-pre-8efffafa532e9e2c25765c596c0e1a84e86102e1.tar.lz
hypervideo-pre-8efffafa532e9e2c25765c596c0e1a84e86102e1.tar.xz
hypervideo-pre-8efffafa532e9e2c25765c596c0e1a84e86102e1.zip
[XVideos] Check HLS formats (#2193)
Closes #1823 Authored by; MinePlayersPE
-rw-r--r--yt_dlp/extractor/xvideos.py23
1 files changed, 19 insertions, 4 deletions
diff --git a/yt_dlp/extractor/xvideos.py b/yt_dlp/extractor/xvideos.py
index ab07f01af..d5261b6ab 100644
--- a/yt_dlp/extractor/xvideos.py
+++ b/yt_dlp/extractor/xvideos.py
@@ -25,14 +25,27 @@ class XVideosIE(InfoExtractor):
(?P<id>[0-9]+)
'''
_TESTS = [{
- 'url': 'http://www.xvideos.com/video4588838/biker_takes_his_girl',
+ 'url': 'https://www.xvideos.com/video4588838/motorcycle_guy_cucks_influencer_steals_his_gf',
'md5': '14cea69fcb84db54293b1e971466c2e1',
'info_dict': {
'id': '4588838',
'ext': 'mp4',
- 'title': 'Biker Takes his Girl',
+ 'title': 'Motorcycle Guy Cucks Influencer, Steals his GF',
'duration': 108,
'age_limit': 18,
+ 'thumbnail': r're:^https://img-hw.xvideos-cdn.com/.+\.jpg',
+ }
+ }, {
+ # Broken HLS formats
+ 'url': 'https://www.xvideos.com/video65982001/what_s_her_name',
+ 'md5': 'b82d7d7ef7d65a84b1fa6965f81f95a5',
+ 'info_dict': {
+ 'id': '65982001',
+ 'ext': 'mp4',
+ 'title': 'what\'s her name?',
+ 'duration': 120,
+ 'age_limit': 18,
+ 'thumbnail': r're:^https://img-hw.xvideos-cdn.com/.+\.jpg',
}
}, {
'url': 'https://flashservice.xvideos.com/embedframe/4588838',
@@ -126,9 +139,11 @@ class XVideosIE(InfoExtractor):
r'setVideo([^(]+)\((["\'])(http.+?)\2\)', webpage):
format_id = kind.lower()
if format_id == 'hls':
- formats.extend(self._extract_m3u8_formats(
+ hls_formats = self._extract_m3u8_formats(
format_url, video_id, 'mp4',
- entry_protocol='m3u8_native', m3u8_id='hls', fatal=False))
+ entry_protocol='m3u8_native', m3u8_id='hls', fatal=False)
+ self._check_formats(hls_formats, video_id)
+ formats.extend(hls_formats)
elif format_id in ('urllow', 'urlhigh'):
formats.append({
'url': format_url,