From 89c0faa9572ef28e909db24101341c887091d42b Mon Sep 17 00:00:00 2001 From: Jake Finley <86554830+JakeFinley96@users.noreply.github.com> Date: Wed, 1 May 2024 18:17:59 +0300 Subject: [PATCH] Add support for old numeric IDs Seems that the old numeric IDs still work with the old URL format. Since the old numeric IDs no longer show up on the website it would probably be safe to remove them from the extractor, but it wasn't a lot of additional code to add support for them. --- yt_dlp/extractor/xvideos.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/yt_dlp/extractor/xvideos.py b/yt_dlp/extractor/xvideos.py index 6e53df667..ff8d52b91 100644 --- a/yt_dlp/extractor/xvideos.py +++ b/yt_dlp/extractor/xvideos.py @@ -207,8 +207,19 @@ class XVideosQuickiesIE(InfoExtractor): 'duration': 9, 'thumbnail': r're:^https://cdn.*-pic.xvideos-cdn.com/.+\.jpg', } + }, { + 'url': 'https://www.xvideos.com/amateur-channels/wifeluna#quickies/a/47258683', + 'md5': '16e322a93282667f1963915568f782c1', + 'info_dict': { + 'id': '47258683', + 'ext': 'mp4', + 'title': 'Verification video', + 'age_limit': 18, + 'duration': 16, + 'thumbnail': r're:^https://cdn.*-pic.xvideos-cdn.com/.+\.jpg', + } }] def _real_extract(self, url): domain, id_ = self._match_valid_url(url).group('domain', 'id') - return self.url_result(f'https://{domain}/video.{id_}/_', XVideosIE, id_) + return self.url_result(f'https://{domain}/video{"." if int_or_none(id_) == None else ""}{id_}/_', XVideosIE, id_)