Repository: yt-dlp
Issue: [iq.com] HTTP Error
Labels: account-needed,site-bug

### Checklist

- [X] I'm asking a question and **not** reporting a bug/feature request
- [X] I've looked through the [README](https://github.com/yt-dlp/yt-dlp#readme)
- [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 searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar questions including closed ones

### Question

This question is replacing my previous issue https://github.com/yt-dlp/yt-dlp/issues/3617
I have since redownloaded yt-dlp using pip install through Anaconda Prompt and it seems to have solved some of my issues, however, I am getting a new error code.
I am wondering if there's any workaround for Got server HTTP error: HTTP Error 500: Internal Server Error - sometimes occurring in the first fragment which aborts the download completely.
The resulting video is missing some 5-6 minutes, and I am guessing it's due to the skipped fragments, is there a way to pinpoint the missing minutes?

Thanks.

### Verbose log

```shell
yt-dlp -vU --force-ipv4 -f 600 --write-subs --sub-format srt --sub-langs "en.*,zh_CN*,zh_TW*" "https://www.iq.com/play/more-than-forever-2019-12-5-19rv4fobe8?lang=en_us" --cookies cookies.txt
[debug] Command-line config: ['-vU', '--force-ipv4', '-f', '600', '--write-subs', '--sub-format', 'srt', '--sub-langs', 'en.*,zh_CN*,zh_TW*', 'https://www.iq.com/play/more-than-forever-2019-12-5-19rv4fobe8?lang=en_us', '--cookies', 'cookies.txt']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, err utf-8, pref cp1252
[debug] yt-dlp version 2022.04.08 [7884ade65]
[debug] Lazy loading extractors is disabled
[debug] Python version 3.9.7 (CPython 64bit) - Windows-10-10.0.19042-SP0
[debug] Checking exe version: ffprobe -bsfs
[debug] Checking exe version: ffmpeg -bsfs
[debug] exe versions: ffmpeg N-106835-gf77ac5131c-20220509 (setts), ffprobe N-106835-gf77ac5131c-20220509, phantomjs 2.1.1
[debug] Optional libraries: Cryptodome-3.14.1, brotli-None, certifi-2021.10.08, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
Latest version: 2022.04.08, Current version: 2022.04.08
yt-dlp is up to date (2022.04.08)
[debug] [iq.com] Extracting URL: https://www.iq.com/play/more-than-forever-2019-12-5-19rv4fobe8?lang=en_us
[iq.com] 19rv4fobe8: Downloading webpage
[debug] Loading iq.player_js from cache
[iq.com] 19rv4fobe8: Downloading VIP data
[debug] Loading iq.player_js from cache
[iq.com] 19rv4fobe8: Executing signature code
[iq.com] 19rv4fobe8: Downloading initial video format info
[iq.com] 19rv4fobe8: Downloading format data for 1080P
[iq.com] 19rv4fobe8: Downloading format data for 480P
[iq.com] 19rv4fobe8: Downloading format data for 360P
[iq.com] 19rv4fobe8: Downloading format data for 720P
[iq.com] 19rv4fobe8: Downloading format data for 240P
[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: en
[info] 19rv4fobe8: Downloading 1 format(s): 600
Deleting existing file More Than Forever Ep 09 [19rv4fobe8].en.srt
[info] Writing video subtitles to: More Than Forever Ep 09 [19rv4fobe8].en.srt
[debug] Invoking downloader on "http://meta.video.iqiyi.com/20200529/92/21/36d2f30c5519745cdff94849dd4f17cc.srt?qd_uid=2646721557438912&qd_tm=1652251878185&qd_tvid=10008500700&qyid=29525d94bc1800e56c42415c4ec95b8d&lid=3"
[debug] File locking is not supported on this platform. Proceeding without locking
[download] Destination: More Than Forever Ep 09 [19rv4fobe8].en.srt
[download] 100% of 94.45KiB in 00:00
[debug] Invoking downloader on "data:application/x-mpegurl;base64,<data>"
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 543
[download] Destination: More Than Forever Ep 09 [19rv4fobe8].mp4
[download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 1 of 10) ...
[download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 2 of 10) ...
[download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 3 of 10) ...
[download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 4 of 10) ...
[download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 5 of 10) ...
[download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 6 of 10) ...
[download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 7 of 10) ...
[download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 8 of 10) ...
[download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 9 of 10) ...
[download] Got server HTTP error: HTTP Error 500: Internal Server Error. Retrying (attempt 10 of 10) ...
ERROR: giving up after 10 retries
  File "C:\Users\callista\Anaconda3\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\callista\Anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\callista\Anaconda3\Scripts\yt-dlp.exe\__main__.py", line 7, in <module>
    sys.exit(main())
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\__init__.py", line 858, in main
    _real_main(argv)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\__init__.py", line 848, in _real_main
    retcode = ydl.download(all_urls)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 3262, in download
    self.__download_wrapper(self.extract_info)(
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 3235, in wrapper
    res = func(*args, **kwargs)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 1391, in extract_info
    return self.__extract_info(url, self.get_info_extractor(ie_key), download, extra_info, process)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 1400, in wrapper
    return func(self, *args, **kwargs)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 1484, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 1540, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 2645, in process_video_result
    self.process_info(new_info)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 3135, in process_info
    success, real_download = self.dl(temp_filename, info_dict)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 2843, in dl
    return fd.download(name, new_info, subtitle)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\downloader\common.py", line 441, in download
    ret = self.real_download(filename, info_dict)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\downloader\hls.py", line 348, in real_download
    return self.download_and_append_fragments(ctx, fragments, info_dict)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\downloader\fragment.py", line 520, in download_and_append_fragments
    download_fragment(fragment, ctx)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\downloader\fragment.py", line 463, in download_fragment
    if self._download_fragment(ctx, fragment['url'], info_dict, headers):
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\downloader\fragment.py", line 126, in _download_fragment
    success, _ = ctx['dl'].download(fragment_filename, fragment_info_dict)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\downloader\common.py", line 441, in download
    ret = self.real_download(filename, info_dict)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\downloader\http.py", line 380, in real_download
    self.report_error('giving up after %s retries' % retries)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 940, in report_error
    self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', *args, **kwargs)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 873, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())

ERROR: fragment 1 not found, unable to continue
  File "C:\Users\callista\Anaconda3\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\callista\Anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\callista\Anaconda3\Scripts\yt-dlp.exe\__main__.py", line 7, in <module>
    sys.exit(main())
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\__init__.py", line 858, in main
    _real_main(argv)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\__init__.py", line 848, in _real_main
    retcode = ydl.download(all_urls)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 3262, in download
    self.__download_wrapper(self.extract_info)(
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 3235, in wrapper
    res = func(*args, **kwargs)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 1391, in extract_info
    return self.__extract_info(url, self.get_info_extractor(ie_key), download, extra_info, process)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 1400, in wrapper
    return func(self, *args, **kwargs)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 1484, in __extract_info
    return self.process_ie_result(ie_result, download, extra_info)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 1540, in process_ie_result
    ie_result = self.process_video_result(ie_result, download=download)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 2645, in process_video_result
    self.process_info(new_info)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 3135, in process_info
    success, real_download = self.dl(temp_filename, info_dict)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 2843, in dl
    return fd.download(name, new_info, subtitle)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\downloader\common.py", line 441, in download
    ret = self.real_download(filename, info_dict)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\downloader\hls.py", line 348, in real_download
    return self.download_and_append_fragments(ctx, fragments, info_dict)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\downloader\fragment.py", line 521, in download_and_append_fragments
    result = append_fragment(
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\downloader\fragment.py", line 493, in append_fragment
    self.report_error(f'fragment {frag_index} not found, unable to continue')
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 940, in report_error
    self.trouble(f'{self._format_err("ERROR:", self.Styles.ERROR)} {message}', *args, **kwargs)
  File "C:\Users\callista\Anaconda3\lib\site-packages\yt_dlp\YoutubeDL.py", line 873, in trouble
    tb_data = traceback.format_list(traceback.extract_stack())
```