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.
pull/9834/head
Jake Finley 2024-05-01 18:17:59 +03:00 zatwierdzone przez GitHub
rodzic 2824a0c9e7
commit 89c0faa957
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 12 dodań i 1 usunięć

Wyświetl plik

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