Repository: yt-dlp/yt-dlp
File: yt_dlp/extractor/xvideos.py (Python)

Code before:
            if format_id == 'hls':
                hls_formats = self._extract_m3u8_formats(
                    format_url, video_id, 'mp4',
                    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,
                    'format_id': '%s-%s' % (determine_ext(format_url, 'mp4'), format_id[3:]),
                    'quality': -2 if format_id.endswith('low') else None,
                })

        return {
            'id': video_id,
            'formats': formats,
            'title': title,
            'duration': duration,
            'thumbnails': thumbnails,
            'age_limit': 18,
        }


class XVideosQuickiesIE(InfoExtractor):
    IE_NAME = 'xvideos:quickies'
    _VALID_URL = r'https?://(?P<domain>(?:[^/?#]+\.)?xvideos2?\.com)/(?:profiles/|amateur-channels/)?[^#]+#quickies/a/(?P<id>[a-z0-9]+)'
    _TESTS = [{
        'url': 'https://www.xvideos.com/lili_love#quickies/a/ipdtikh1a4c',
        'md5': '670235b33d790201f4515fd3604fa236',
        'info_dict': {
            'id': 'ipdtikh1a4c',
            'ext': 'mp4',
            'title': 'Mexican chichóna putisima',
            'age_limit': 18,
            'duration': 80,
            '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_)


Review comment (suggestion):
```suggestion
    _VALID_URL = r'https?://(?P<domain>(?:[^/?#]+\.)?xvideos2?\.com)/(?:profiles/|amateur-channels/)?[^#]+#quickies/a/(?P<id>\w+)'
```

Code after:
            if format_id == 'hls':
                hls_formats = self._extract_m3u8_formats(
                    format_url, video_id, 'mp4',
                    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,
                    'format_id': '%s-%s' % (determine_ext(format_url, 'mp4'), format_id[3:]),
                    'quality': -2 if format_id.endswith('low') else None,
                })

        return {
            'id': video_id,
            'formats': formats,
            'title': title,
            'duration': duration,
            'thumbnails': thumbnails,
            'age_limit': 18,
        }


class XVideosQuickiesIE(InfoExtractor):
    IE_NAME = 'xvideos:quickies'
    _VALID_URL = r'https?://(?P<domain>(?:[^/?#]+\.)?xvideos2?\.com)/(?:profiles/|amateur-channels/)?[^/?#]+#quickies/a/(?P<id>\w+)'
    _TESTS = [{
        'url': 'https://www.xvideos.com/lili_love#quickies/a/ipdtikh1a4c',
        'md5': 'f9e4f518ff1de14b99a400bbd0fc5ee0',
        'info_dict': {
            'id': 'ipdtikh1a4c',
            'ext': 'mp4',
            'title': 'Mexican chichóna putisima',
            'age_limit': 18,
            'duration': 81,
            'thumbnail': r're:^https://cdn.*-pic.xvideos-cdn.com/.+\.jpg',
        }
    }, {
        'url': 'https://www.xvideos.com/profiles/lili_love#quickies/a/ipphaob6fd1',
        'md5': '5340938aac6b46e19ebdd1d84535862e',
        'info_dict': {
            'id': 'ipphaob6fd1',
            'ext': 'mp4',
            'title': 'Puta chichona mexicana squirting',
            'age_limit': 18,
            'duration': 56,
            'thumbnail': r're:^https://cdn.*-pic.xvideos-cdn.com/.+\.jpg',
        }
    }, {
        'url': 'https://www.xvideos.com/amateur-channels/lili_love#quickies/a/hfmffmd7661',
        'md5': '92428518bbabcb4c513e55922e022491',