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.
This commit is contained in:
Jake Finley 2024-05-01 18:17:59 +03:00 committed by GitHub
parent 2824a0c9e7
commit 89c0faa957
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 1 deletions

View File

@ -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_)