Repository: yt-dlp/yt-dlp

Issue:
yt-dlp failed to work on youku
### Checklist

- [X] I'm reporting a broken site
- [X] I've verified that I'm running yt-dlp version **2022.07.18** ([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/ytdl-org/youtube-dl#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 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)
- [ ] 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

China

### Provide a description that is worded well enough to be understood

I'm pretty sure several days ago, I can use yt-dlp to download videos from youku.
Later on, just one day I found yt-dlp stopped working.
details below

test url
https://v.youku.com/v_show/id_XNDAxMjcyMzE1Mg==.html?
ERROR: [youku] XMTM5NjgyMDEyOA: Youku server reported error -6001: ccode参数错误; please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template.

### 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] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
[debug] Encodings: locale cp936, fs utf-8, pref cp936, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.07.18 [https://github.com/yt-dlp/yt-dlp/commit/135f05ef667851869756ad3bf892726e376db27c]
[debug] Python 3.10.4 (CPython 64bit) - Windows-10-10.0.19044-SP0
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: avconv -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] Checking exe version: avprobe -bsfs
[debug] exe versions: none
[debug] Optional libraries: Cryptodome-3.14.1, brotli-1.0.9, certifi-2022.05.18.1, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[debug] Proxy map: {}
[debug] [youku] Extracting URL: https://v.youku.com/v_show/id_XNDAxMjcyMzE1Mg==.html?
[youku] XNDAxMjcyMzE1Mg: Retrieving cna info
[youku] XNDAxMjcyMzE1Mg: Downloading JSON metadata
ERROR: [youku] XNDAxMjcyMzE1Mg: Youku server reported error -6001: ccode参数错误; 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 "c:\Users\u1\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\extractor\common.py", line 644, in extract
ie_result = self._real_extract(url)
File "c:\Users\u1\AppData\Local\Programs\Python\Python310\lib\site-packages\yt_dlp\extractor\youku.py", line 186, in _real_extract
raise ExtractorError(msg)
```



Discussion:
What happened to the rest of the output?

> What happened to the rest of the output?

I've updated the Verbose Output, that's all in the terminal.
Hope it helps. Thanks

Test links with no geo restriction:
https://v.youku.com/v_show/id_XNTg2Njk4NzQ5Ng==.html?spm=a2hbt.13141534.1_5.d_1_2&s=bcdfe86b05794c7a92f1&scm=20140719.manual.59991.video_XNTg2Njk4NzQ5Ng==

https://v.youku.com/v_show/id_XNTE2ODg4Mzk4NA==.html?spm=a2ha1.14919748_WEBHOME_GRAY.drawer20.d_zj2_5&scm=20140719.rcmd.5497.video_XNTE2ODg4Mzk4NA%3D%3D
The entire site is inaccessible for me (without VPN)
Seems youku ccode 0532 outdated.
Also
F:\MyDownload>yt-dlp.exe -Uv  -F --cookies-from-browser chrome  https://v.youku.com/v_show/id_XNTE2ODg4Mzk4NA
[debug] Command-line config: ['-Uv', '-F', '--cookies-from-browser', 'chrome', 'https://v.youku.com/v_show/id_XNTE2ODg4Mzk4NA']
[debug] Encodings: locale cp936, fs utf-8, pref cp936, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.08.08 [3157158] (win32_exe)
[debug] Python 3.8.10 (CPython 64bit) - Windows-10-10.0.19044-SP0
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg 4.3.1-2021-01-01-essentials_build-www.gyan.dev, ffprobe 4.3.1-2021-01-01-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.15.0, brotli-1.0.9, certifi-2022.06.15, mutagen-1.45.1, sqlite3-2.6.0, websockets-10.3
[Cookies] Extracting cookies from chrome
[debug] Extracting cookies from: "C:\Users\yosandev\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies"
[debug] Found local state file at "C:\Users\yosandev\AppData\Local\Google\Chrome\User Data\Local State"
[Cookies] Extracted 3273 cookies from chrome
[debug] cookie version breakdown: {'v10': 3274, 'other': 0, 'unencrypted': 0}
[debug] Proxy map: {'http': 'http://127.0.0.1:7890', 'https': 'https://127.0.0.1:7890', 'ftp': 'ftp://127.0.0.1:7890'}
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.08.08, Current version: 2022.08.08
yt-dlp is up to date (2022.08.08)
[debug] [youku] Extracting URL: https://v.youku.com/v_show/id_XNTE2ODg4Mzk4NA
[youku] XNTE2ODg4Mzk4NA: Retrieving cna info
[youku] XNTE2ODg4Mzk4NA: Downloading JSON metadata
ERROR: [youku] XNTE2ODg4Mzk4NA: Youku server reported error -6001: ccode参数错误; 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 666, in extract
  File "yt_dlp\extractor\youku.py", line 186, in _real_extract


F:\MyDownload>
修改/site-packages/yt_dlp/extractor/youku.py第154行，ccode改为0524或者0564即可。
> 修改/site-packages/yt_dlp/extractor/youku.py第154行，ccode改为0524或者0564即可。

有效，谢谢
> 修改/site-packages/yt_dlp/extractor/youku.py第154行，ccode改为0524或者0564即可。

亲测有效，谢谢

Resolving patch:
diff --git a/yt_dlp/extractor/youku.py b/yt_dlp/extractor/youku.py
--- a/yt_dlp/extractor/youku.py
+++ b/yt_dlp/extractor/youku.py
@@ -96,25 +96,35 @@ class YoukuIE(InfoExtractor):
             'thumbnail': r're:^https?://.*',
             'uploader': '明月庄主moon',
             'uploader_id': '38465621',
-            'uploader_url': 'http://i.youku.com/u/UMTUzODYyNDg0',
+            'uploader_url': 'https://www.youku.com/profile/index/?uid=UMTUzODYyNDg0',
             'tags': list,
         },
     }, {
-        'url': 'http://video.tudou.com/v/XMjIyNzAzMTQ4NA==.html?f=46177805',
+        'url': 'https://v.youku.com/v_show/id_XNTA2NTA0MjA1Mg==.html',
         'info_dict': {
-            'id': 'XMjIyNzAzMTQ4NA',
+            'id': 'XNTA2NTA0MjA1Mg',
             'ext': 'mp4',
-            'title': '卡马乔国足开大脚长传冲吊集锦',
-            'duration': 289,
+            'title': 'Minecraft我的世界：建造超大巨型航空飞机，菜鸟vs高手vs黑客',
+            'duration': 542.13,
             'thumbnail': r're:^https?://.*',
-            'uploader': '阿卜杜拉之星',
-            'uploader_id': '2382249',
-            'uploader_url': 'http://i.youku.com/u/UOTUyODk5Ng==',
+            'uploader': '波哥游戏解说',
+            'uploader_id': '156688084',
+            'uploader_url': 'https://www.youku.com/profile/index/?uid=UNjI2NzUyMzM2',
             'tags': list,
         },
     }, {
-        'url': 'http://video.tudou.com/v/XMjE4ODI3OTg2MA==.html',
-        'only_matching': True,
+        'url': 'https://v.youku.com/v_show/id_XNTE1MzczOTg4MA==.html',
+        'info_dict': {
+            'id': 'XNTE1MzczOTg4MA',
+            'ext': 'mp4',
+            'title': '国产超A特工片',
+            'duration': 362.97,
+            'thumbnail': r're:^https?://.*',
+            'uploader': '陈晓娟说历史',
+            'uploader_id': '1640913339',
+            'uploader_url': 'https://www.youku.com/profile/index/?uid=UNjU2MzY1MzM1Ng==',
+            'tags': list,
+        },
     }]
 
     @staticmethod
@@ -151,7 +161,7 @@ def _real_extract(self, url):
         # request basic data
         basic_data_params = {
             'vid': video_id,
-            'ccode': '0532',
+            'ccode': '0524',
             'client_ip': '192.168.1.1',
             'utid': cna,
             'client_ts': time.time() / 1000,


Test patch: