Repository: yt-dlp
Issue: Peloton Extractor: Issue extracting VTT subs on Peloton videos
Labels: site-bug,can-share-account

### Checklist

- [X] I'm reporting a new site support request
- [X] I've verified that I'm running yt-dlp version **2022.04.08** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've checked that all provided URLs are alive and playable in a browser
- [X] I've checked that none of provided URLs [violate any copyrights](https://github.com/ytdl-org/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free) or contain any [DRM](https://en.wikipedia.org/wiki/Digital_rights_management) to the best of my knowledge
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues including closed ones. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)
- [X] I've read about [sharing account credentials](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#are-you-willing-to-share-account-details-if-needed) and am willing to share it if required

### Region

_No response_

### Example URLs

- Single Video: https://members.onepeloton.com/classes/player/85dbe9e47de7464f81f2a0a2f3327230

### Description

It seems there's a parse error as the last sub line has metadata but no payload:

```
00:33:00.665 --> 00:33:02.330 align:middle line:90%
Have an amazing weekend.

00:33:02.330 --> 00:33:36.000 align:middle line:90%
```

### Verbose log

```shell
[debug] Command-line config: ['-vU', '--ignore-errors', '--restrict-filenames', '--audio-quality', '0', '--username', 'PRIVATE', '--password', 'PRIVATE', '--no-overwrites', '--embed-subs', 'https://members.onepeloton.com/classes/player/85dbe9e47de7464f81f2a0a2f3327230']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, err utf-8, pref UTF-8
[debug] yt-dlp version 2022.04.08 [7884ade65] (zip)
[debug] Python version 3.8.10 (CPython 64bit) - Linux-5.15.0-27-generic-x86_64-with-glibc2.29
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 5.0.1 (setts), ffprobe 5.0.1
[debug] Optional libraries: sqlite
[debug] Proxy map: {}
Latest version: 2022.04.08, Current version: 2022.04.08
yt-dlp is up to date (2022.04.08)
[debug] [peloton] Extracting URL: https://members.onepeloton.com/classes/player/85dbe9e47de7464f81f2a0a2f3327230
[peloton] 85dbe9e47de7464f81f2a0a2f3327230: Starting session
[peloton] 85dbe9e47de7464f81f2a0a2f3327230: Logging in
[peloton] 85dbe9e47de7464f81f2a0a2f3327230: Starting session
[peloton] 85dbe9e47de7464f81f2a0a2f3327230: Downloading JSON metadata
[peloton] 85dbe9e47de7464f81f2a0a2f3327230: Downloading token
[peloton] 85dbe9e47de7464f81f2a0a2f3327230: Downloading m3u8 information
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, hdr:12(7), vcodec:vp9.2(10), acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Downloading subtitles: eng
[debug] Default format spec: bestvideo*+bestaudio/best
[info] 85dbe9e47de7464f81f2a0a2f3327230: Downloading 1 format(s): 4906+Audio_Selector_Group_1-Original_Mix
[info] Writing video subtitles to: 30_min_Club_Bangers_Ride-[85dbe9e47de7464f81f2a0a2f3327230].eng.vtt
[debug] Invoking downloader on "https://amd-vod.akamaized.net/classes/cycling/04-2022/85dbe9e47de7464f81f2a0a2f3327230/1/hdntl=exp=1651241941~acl=%2f*~id=2cluN8YnNg45FNpWpO8emQ~data=hdntl~hmac=c7078f215d7bd4dbfc602abd90af3f1f95dbd3320613983588e2e19075fa9b13/master_en.m3u8"
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 1
[download] Destination: 30_min_Club_Bangers_Ride-[85dbe9e47de7464f81f2a0a2f3327230].eng.vtt
[download] 30_min_Club_Bangers_Ride-[85dbe9e47de7464f81f2a0a2f3327230].eng.vtt.part-Frag1 has already been downloaded
[download] 100% of ~68.72KiB at Unknown speed ETA Unknown (frag 1/1)ERROR: Parse error at position 70318 (near '00:33:02.330 --> 00:')
Traceback (most recent call last):
  File "/usr/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 1408, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 1492, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "/usr/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 1548, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "/usr/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 2648, in process_video_result
    self.process_info(new_info)
  File "/usr/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 2900, in process_info
    sub_files = self._write_subtitles(info_dict, temp_filename)
  File "/usr/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 3871, in _write_subtitles
    self.dl(sub_filename, sub_copy, subtitle=True)
  File "/usr/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 2846, in dl
    return fd.download(name, new_info, subtitle)
  File "/usr/bin/yt-dlp/yt_dlp/downloader/common.py", line 457, in download
    ret = self.real_download(filename, info_dict)
  File "/usr/bin/yt-dlp/yt_dlp/downloader/hls.py", line 355, in real_download
    self.download_and_append_fragments(
  File "/usr/bin/yt-dlp/yt_dlp/downloader/fragment.py", line 531, in download_and_append_fragments
    result = append_fragment(decrypt_fragment(fragment, self._read_fragment(ctx)), fragment['frag_index'], ctx)
  File "/usr/bin/yt-dlp/yt_dlp/downloader/fragment.py", line 498, in append_fragment
    self._append_fragment(ctx, pack_func(frag_content, frag_index))
  File "/usr/bin/yt-dlp/yt_dlp/downloader/hls.py", line 270, in pack_fragment
    for block in webvtt.parse_fragment(frag_content):
  File "/usr/bin/yt-dlp/yt_dlp/webvtt.py", line 398, in parse_fragment
    raise ParseError(parser)
yt_dlp.webvtt.ParseError: Parse error at position 70318 (near '00:33:02.330 --> 00:')
```