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

Code before:

        return subtitles

    def _extract_all_video_quality(self, api_response):
        quality = []
        formats_response = api_response['fl']['fi']
        for f in formats_response:
            quality.append(f.get('name'))
        return quality

    def _extract_all_video_formats_and_subtitles(self, url, video_id, series_id):
        first_api_response = self._get_video_api_response(url, video_id, series_id, 'vtt', 'hls', 'hd')
        self._check_api_response(first_api_response)
        api_responses = [first_api_response]
        quality = self._extract_all_video_quality(first_api_response)
        for q in quality:
            if q != 'sd' and q != 'hd':
                api_response = self._get_video_api_response(
                    url, video_id, series_id, 'vtt', 'hls', q)
                self._check_api_response(api_response)
                api_responses.append(api_response)

        formats, subtitles = [], {}
        for api_response in api_responses:
            fmts, subs = self._extract_video_formats_and_subtitles(api_response, video_id)
            native_subtitles = self._extract_video_native_subtitles(api_response, 'vtt')

            formats.extend(fmts)
            self._merge_subtitles(subs, native_subtitles, target=subtitles)

        return formats, subtitles

    def _get_clean_title(self, title):
        return re.sub(
            r'\s*[_\-]\s*(?:Watch online|腾讯视频|(?:高清)?1080P在线观看平台).*?$',
            '', title or '').strip() or None


class VQQBaseIE(TencentBaseIE):
    _VALID_URL_BASE = r'https?://v\.qq\.com'

    _API_URL = 'https://h5vv6.video.qq.com/getvinfo'
    _APP_VERSION = '3.5.57'
    _PLATFORM = '10901'
    _HOST = 'v.qq.com'
    _REFERER = 'v.qq.com'

    def _get_webpage_metadata(self, webpage, video_id):
        return self._parse_json(
            self._search_regex(
                r'(?s)<script[^>]*>[^<]*window\.__pinia\s*=\s*([^<]+)</script>',

Review comment (bug):
And also srt subtitles are missing

yt-dlp 2022.10.04
```bash
[debug] Command-line config: ['https://wetv.vip/play/7csb8h9c79p8idi/a0041yw44yk', '--verbose', '--list-subs']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.10.04 [4e0511f27] (debian*) API
[debug] Python 3.10.7 (CPython 64bit) - Linux-5.19.0-26-generic-x86_64-with-glibc2.36 (glibc 2.36)
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg N-108931-g4dda3b1653-20221104 (setts), ffprobe N-108931-g4dda3b1653-20221104, phantomjs 139956238714816, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.11.0, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, pyxattr-0.7.2, secretstorage-3.3.3, sqlite3-2.6.0, websockets-10.2
[debug] Proxy map: {}
[debug] Loaded 1690 extractors
[debug] [wetv:episode] Extracting URL: https://wetv.vip/play/7csb8h9c79p8idi/a0041yw44yk
[wetv:episode] a0041yw44yk: Downloading webpage
[wetv:episode] a0041yw44yk: Downloading webpage
[wetv:episode] a0041yw44yk: Downloading webpage
[wetv:episode] a0041yw44yk: Downloading m3u8 information
[wetv:episode] a0041yw44yk: Downloading m3u8 information
[wetv:episode] a0041yw44yk: Downloading webpage
[wetv:episode] a0041yw44yk: Downloading m3u8 information
[wetv:episode] a0041yw44yk: Downloading m3u8 information
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[info] Available subtitles for a0041yw44yk:
Language Formats
en       vtt, vtt, srt
zh-cn    vtt, vtt, srt
zh-tw    vtt, vtt, srt
th       vtt, vtt, srt
vi       vtt, vtt, srt
id       vtt, vtt, srt
ms       vtt, vtt, srt
ar       vtt, vtt, srt
ko       vtt, vtt, srt
pt       vtt, vtt, srt
es       vtt, vtt, srt
```

Your branch
```bash
[debug] Command-line config: ['https://wetv.vip/play/7csb8h9c79p8idi/a0041yw44yk', '--verbose', '--list-subs']
[debug] User config: []
[debug] System config: []
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2023.01.02 [d83b0ad80] (source)
[debug] Lazy loading extractors is disabled
[debug] Git HEAD: 62bd9c276
[debug] Python 3.10.7 (CPython x86_64 64bit) - Linux-5.19.0-26-generic-x86_64-with-glibc2.36 (OpenSSL 3.0.5 5 Jul 2022, glibc 2.36)
[debug] exe versions: ffmpeg N-108931-g4dda3b1653-20221104 (setts), ffprobe N-108931-g4dda3b1653-20221104, phantomjs broken, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.15.0, certifi-2022.09.24, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1756 extractors
[wetv:episode] Extracting URL: https://wetv.vip/play/7csb8h9c79p8idi/a0041yw44yk
[wetv:episode] a0041yw44yk: Downloading webpage
[wetv:episode] a0041yw44yk: Downloading webpage
[wetv:episode] a0041yw44yk: Downloading webpage
[wetv:episode] a0041yw44yk: Downloading webpage
[wetv:episode] a0041yw44yk: Downloading webpage
[wetv:episode] a0041yw44yk: Downloading m3u8 information
[wetv:episode] a0041yw44yk: Downloading m3u8 information
[wetv:episode] a0041yw44yk: Downloading m3u8 information
[wetv:episode] a0041yw44yk: Downloading m3u8 information
[wetv:episode] a0041yw44yk: Downloading m3u8 information
[wetv:episode] a0041yw44yk: Downloading m3u8 information
[wetv:episode] a0041yw44yk: Downloading m3u8 information
[wetv:episode] a0041yw44yk: Downloading m3u8 information
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), channels, acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[info] Available subtitles for a0041yw44yk:
Language Formats
en       vtt, vtt, vtt, vtt
zh-cn    vtt, vtt, vtt, vtt
zh-tw    vtt, vtt, vtt, vtt
th       vtt, vtt, vtt, vtt
vi       vtt, vtt, vtt, vtt
id       vtt, vtt, vtt, vtt
ms       vtt, vtt, vtt, vtt
ar       vtt, vtt, vtt, vtt
ko       vtt, vtt, vtt, vtt
pt       vtt, vtt, vtt, vtt
es       vtt, vtt, vtt, vtt
```

Code after:
        return subtitles

    def _extract_all_video_formats_and_subtitles(self, url, video_id, series_id):
        api_responses = [self._get_video_api_response(url, video_id, series_id, 'srt', 'hls', 'hd')]
        self._check_api_response(api_responses[0])
        qualities = traverse_obj(api_responses, (0, 'fl', 'fi', ..., 'name')) or ('shd', 'fhd')
        for q in qualities:
            if q not in ('ld', 'sd', 'hd'):
                api_responses.append(self._get_video_api_response(
                    url, video_id, series_id, 'vtt', 'hls', q))
                self._check_api_response(api_responses[-1])

        formats, subtitles = [], {}
        for api_response in api_responses:
            fmts, subs = self._extract_video_formats_and_subtitles(api_response, video_id)
            native_subtitles = self._extract_video_native_subtitles(api_response)

            formats.extend(fmts)
            self._merge_subtitles(subs, native_subtitles, target=subtitles)

        return formats, subtitles

    def _get_clean_title(self, title):
        return re.sub(
            r'\s*[_\-]\s*(?:Watch online|Watch HD Video Online|WeTV|腾讯视频|(?:高清)?1080P在线观看平台).*?$',
            '', title or '').strip() or None


class VQQBaseIE(TencentBaseIE):
    _VALID_URL_BASE = r'https?://v\.qq\.com'

    _API_URL = 'https://h5vv6.video.qq.com/getvinfo'
    _APP_VERSION = '3.5.57'
    _PLATFORM = '10901'
    _HOST = 'v.qq.com'
    _REFERER = 'v.qq.com'

    def _get_webpage_metadata(self, webpage, video_id):
        return self._parse_json(
            self._search_regex(
                r'(?s)<script[^>]*>[^<]*window\.__pinia\s*=\s*([^<]+)</script>',
                webpage, 'pinia data', fatal=False),
            video_id, transform_source=js_to_json, fatal=False)


class VQQVideoIE(VQQBaseIE):
    IE_NAME = 'vqq:video'
    _VALID_URL = VQQBaseIE._VALID_URL_BASE + r'/x/(?:page|cover/(?P<series_id>\w+))/(?P<id>\w+)'

    _TESTS = [{
        'url': 'https://v.qq.com/x/page/q326831cny0.html',