Repository: yt-dlp
Issue: Getting error 304 when I try to download a video from iqiyi
Labels: account-needed,site-bug,triage,can-share-account

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I *intentionally* remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting that a **supported** site is broken
- [X] I've verified that I'm running yt-dlp version **2023.03.04** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched [known issues](https://github.com/yt-dlp/yt-dlp/issues/3766) and 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 I'm willing to share it if required

### Region

Singapore

### Provide a description that is worded well enough to be understood

Most movies on iqiyi have this problem.

Here's the sample url:

https://www.iq.com/play/%E4%BD%A0%E7%9A%84%E5%A9%9A%E7%A4%BC-2021-162m09tyw68?lang=zh_cn

Here's the log: 

```
[debug] Command-line config: ['-vU', '-o', '%(extractor)s\\%(title)s[%(id)s].%(ext)s', 'https://www.iq.com/play/%E4%BD%A0%E7%9A%84%E5%A9%9A%E7%A4%BC-2021-162m09tyw68?lang=zh_cn', '--cookies', 'cookies.txt']
[debug] Encodings: locale cp936, fs utf-8, pref cp936, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.03.04 [392389b7d] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19044-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 2021-10-11-git-90a0da9f14-full_build-www.gyan.dev (setts), ffprobe 2021-10-11-git-90a0da9f14-full_build-www.gyan.dev, phantomjs 2.1.1
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1786 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version: stable@2023.03.04, Current version: stable@2023.03.04
Current Build Hash: 5590c57bd0433ed239a2deaaf92e2ad6f37fe50f53664c821575cafe106a9421
yt-dlp is up to date (stable@2023.03.04)
[iq.com] Extracting URL: https://www.iq.com/play/%E4%BD%A0%E7%9A%84%E5%A9%9A%E7%A4%BC-2021-162m09tyw68?lang=zh_cn
[iq.com] 162m09tyw68: Downloading webpage
ERROR: [iq.com] 162m09tyw68: Unable to download webpage: HTTP Error 304: Not Modified (caused by <HTTPError 304: 'Not Modified'>); please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "yt_dlp\extractor\common.py", line 694, in extract
  File "yt_dlp\extractor\iqiyi.py", line 567, in _real_extract
  File "yt_dlp\extractor\common.py", line 1097, in _download_webpage
  File "yt_dlp\extractor\common.py", line 1048, in download_content
  File "yt_dlp\extractor\common.py", line 882, in _download_webpage_handle
  File "yt_dlp\extractor\common.py", line 839, in _request_webpage

  File "yt_dlp\extractor\common.py", line 821, in _request_webpage
  File "yt_dlp\YoutubeDL.py", line 3742, in urlopen
  File "urllib\request.py", line 531, in open
  File "urllib\request.py", line 640, in http_response
  File "urllib\request.py", line 569, in error
  File "urllib\request.py", line 502, in _call_chain
  File "urllib\request.py", line 649, in http_error_default
urllib.error.HTTPError: HTTP Error 304: Not Modified
```

I have tested the cookie file and it is correct. Downloading dramas from that site using the same cookie works properly. The movie also plays properly from a browser from that link.


### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [X] If using API, add `'verbose': True` to `YoutubeDL` params instead
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Command-line config: ['-vU', '-o', '%(extractor)s\\%(title)s[%(id)s].%(ext)s', 'https://www.iq.com/play/%E4%BD%A0%E7%9A%84%E5%A9%9A%E7%A4%BC-2021-162m09tyw68?lang=zh_cn', '--cookies', 'cookies.txt']
[debug] Encodings: locale cp936, fs utf-8, pref cp936, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.03.04 [392389b7d] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19044-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 2021-10-11-git-90a0da9f14-full_build-www.gyan.dev (setts), ffprobe 2021-10-11-git-90a0da9f14-full_build-www.gyan.dev, phantomjs 2.1.1
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1786 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version: stable@2023.03.04, Current version: stable@2023.03.04
Current Build Hash: 5590c57bd0433ed239a2deaaf92e2ad6f37fe50f53664c821575cafe106a9421
yt-dlp is up to date (stable@2023.03.04)
[iq.com] Extracting URL: https://www.iq.com/play/%E4%BD%A0%E7%9A%84%E5%A9%9A%E7%A4%BC-2021-162m09tyw68?lang=zh_cn
[iq.com] 162m09tyw68: Downloading webpage
ERROR: [iq.com] 162m09tyw68: Unable to download webpage: HTTP Error 304: Not Modified (caused by <HTTPError 304: 'Not Modified'>); please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "yt_dlp\extractor\common.py", line 694, in extract
  File "yt_dlp\extractor\iqiyi.py", line 567, in _real_extract
  File "yt_dlp\extractor\common.py", line 1097, in _download_webpage
  File "yt_dlp\extractor\common.py", line 1048, in download_content
  File "yt_dlp\extractor\common.py", line 882, in _download_webpage_handle
  File "yt_dlp\extractor\common.py", line 839, in _request_webpage

  File "yt_dlp\extractor\common.py", line 821, in _request_webpage
  File "yt_dlp\YoutubeDL.py", line 3742, in urlopen
  File "urllib\request.py", line 531, in open
  File "urllib\request.py", line 640, in http_response
  File "urllib\request.py", line 569, in error
  File "urllib\request.py", line 502, in _call_chain
  File "urllib\request.py", line 649, in http_error_default
urllib.error.HTTPError: HTTP Error 304: Not Modified
```