Repository: youtube-dl
Issue: [twitch] VODs subtitle (chat) failed to download (Error 401: Unauthorized) when using --cookies argument
Labels: account-needed

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2020.12.14. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that all URLs and arguments with special characters are properly quoted or escaped as explained in http://yt-dl.org/escape.
- Search the bugtracker for similar issues: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a broken site support
- [x] I've verified that I'm running youtube-dl version **2020.12.14**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
- [x] I've searched the bugtracker for similar issues including closed ones


## Verbose log

<!--
Provide the complete verbose output of youtube-dl that clearly demonstrates the problem.
Add the `-v` flag to your command line you run youtube-dl with (`youtube-dl -v <your command line>`), copy the WHOLE output and insert it below. It should look similar to this:
 [debug] System config: []
 [debug] User config: []
 [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj']
 [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
 [debug] youtube-dl version 2020.12.14
 [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2
 [debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4
 [debug] Proxy map: {}
 <more lines>
-->

```
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', '--cookies', 'D:\\Twitch\\twitch.tv_cookies.txt', '--all-subs', '--skip-download', 'https://www.twitch.tv/juicylucy72/videos?filter=archives&sort=time']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2020.12.14
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: ffmpeg 4.3.1-2020-11-19-full_build-www.gyan.dev, ffprobe 4.3.1-2020-11-19-full_build-www.gyan.dev
[debug] Proxy map: {}
[download] Downloading playlist: juicylucy72 - Past Broadcasts sorted by Date
[TwitchVideos] juicylucy72: Downloading Videos GraphQL page 1
[TwitchVideos] playlist juicylucy72 - Past Broadcasts sorted by Date: Downloading 15 videos
[download] Downloading video 1 of 15
[twitch:vod] 842712286: Downloading video info JSON
[twitch:vod] 842712286: Downloading vod access token
[twitch:vod] 842712286: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video subtitles to: [KOR _ ENG] 힐링노래방 YES chillin' singing Stream-v842712286.rechat.json
WARNING: Unable to download subtitle for "rechat": Unable to download webpage: HTTP Error 401: Unauthorized (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Downloading video 2 of 15
[twitch:vod] 840509445: Downloading video info JSON
[twitch:vod] 840509445: Downloading vod access token
[twitch:vod] 840509445: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video subtitles to: [KOR _ ENG] 힐링노래방 YES chillin' singing Stream-v840509445.rechat.json
WARNING: Unable to download subtitle for "rechat": Unable to download webpage: HTTP Error 401: Unauthorized (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Downloading video 3 of 15
[twitch:vod] 839383244: Downloading video info JSON
[twitch:vod] 839383244: Downloading vod access token
[twitch:vod] 839383244: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video subtitles to: [KOR _ ENG] YES short PC Stream-v839383244.rechat.json
WARNING: Unable to download subtitle for "rechat": Unable to download webpage: HTTP Error 401: Unauthorized (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Downloading video 4 of 15
[twitch:vod] 839215211: Downloading video info JSON
[twitch:vod] 839215211: Downloading vod access token
[twitch:vod] 839215211: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video subtitles to: [KOR _ ENG] Dance practice stream-v839215211.rechat.json
WARNING: Unable to download subtitle for "rechat": Unable to download webpage: HTTP Error 401: Unauthorized (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Downloading video 5 of 15
[twitch:vod] 839182139: Downloading video info JSON
[twitch:vod] 839182139: Downloading vod access token
[twitch:vod] 839182139: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video subtitles to: [KOR _ ENG] 테스트! test!-v839182139.rechat.json
WARNING: Unable to download subtitle for "rechat": Unable to download webpage: HTTP Error 401: Unauthorized (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Downloading video 6 of 15
[twitch:vod] 837028668: Downloading video info JSON
[twitch:vod] 837028668: Downloading vod access token
[twitch:vod] 837028668: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video subtitles to: [KOR _ ENG] 12시까지 짧뱅! YES short Singing Stream! -v837028668.rechat.json
WARNING: Unable to download subtitle for "rechat": Unable to download webpage: HTTP Error 401: Unauthorized (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Downloading video 7 of 15
[twitch:vod] 835931201: Downloading video info JSON
[twitch:vod] 835931201: Downloading vod access token
[twitch:vod] 835931201: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video subtitles to: [KOR _ ENG] 12시까지 짧뱅! YES short Singing Stream! -v835931201.rechat.json
WARNING: Unable to download subtitle for "rechat": Unable to download webpage: HTTP Error 401: Unauthorized (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Downloading video 8 of 15
[twitch:vod] 834658483: Downloading video info JSON
[twitch:vod] 834658483: Downloading vod access token
[twitch:vod] 834658483: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video subtitles to: [KOR _ ENG] 오늘도 노래뱅! YES Singing Stream!-v834658483.rechat.json
WARNING: Unable to download subtitle for "rechat": Unable to download webpage: HTTP Error 401: Unauthorized (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Downloading video 9 of 15
[twitch:vod] 833629621: Downloading video info JSON
[twitch:vod] 833629621: Downloading vod access token
[twitch:vod] 833629621: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video subtitles to: [KOR _ ENG] 새벽노래방-3- Singing Lucy! -v833629621.rechat.json
WARNING: Unable to download subtitle for "rechat": Unable to download webpage: HTTP Error 401: Unauthorized (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Downloading video 10 of 15
[twitch:vod] 831201980: Downloading video info JSON
[twitch:vod] 831201980: Downloading vod access token
[twitch:vod] 831201980: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video subtitles to: [KOR _ ENG] 새벽노래방-3- Singing Lucy! -v831201980.rechat.json
WARNING: Unable to download subtitle for "rechat": Unable to download webpage: HTTP Error 401: Unauthorized (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Downloading video 11 of 15
[twitch:vod] 829906936: Downloading video info JSON
[twitch:vod] 829906936: Downloading vod access token
[twitch:vod] 829906936: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video subtitles to: [KOR _ ENG] 오늘도 노래뱅! YES Singing Stream!-v829906936.rechat.json
WARNING: Unable to download subtitle for "rechat": Unable to download webpage: HTTP Error 401: Unauthorized (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Downloading video 12 of 15
[twitch:vod] 829850048: Downloading video info JSON
[twitch:vod] 829850048: Downloading vod access token
[twitch:vod] 829850048: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video subtitles to: [KOR _ ENG] ! Yes Stream!-v829850048.rechat.json
WARNING: Unable to download subtitle for "rechat": Unable to download webpage: HTTP Error 401: Unauthorized (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Downloading video 13 of 15
[twitch:vod] 828808045: Downloading video info JSON
[twitch:vod] 828808045: Downloading vod access token
[twitch:vod] 828808045: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video subtitles to: [KOR _ ENG] ! Yes Stream!-v828808045.rechat.json
WARNING: Unable to download subtitle for "rechat": Unable to download webpage: HTTP Error 401: Unauthorized (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Downloading video 14 of 15
[twitch:vod] 828753355: Downloading video info JSON
[twitch:vod] 828753355: Downloading vod access token
[twitch:vod] 828753355: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video subtitles to: [KOR _ ENG] ! Yes Stream!-v828753355.rechat.json
WARNING: Unable to download subtitle for "rechat": Unable to download webpage: HTTP Error 401: Unauthorized (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Downloading video 15 of 15
[twitch:vod] 827652373: Downloading video info JSON
[twitch:vod] 827652373: Downloading vod access token
[twitch:vod] 827652373: Downloading m3u8 information
[debug] Default format spec: bestvideo+bestaudio/best
[info] Writing video subtitles to: [KOR _ ENG] 루씨! 늦어서 미안..!-v827652373.rechat.json
WARNING: Unable to download subtitle for "rechat": Unable to download webpage: HTTP Error 401: Unauthorized (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
[download] Finished downloading playlist: juicylucy72 - Past Broadcasts sorted by Date
```


## Description

<!--
Provide an explanation of your issue in an arbitrary form. Provide any additional information, suggested solution and as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

Downloading subtitles (the chat) for Twitch video-on-demands failed when using `--cookies "cookies.txt"` argument with this error:
```
WARNING: Unable to download subtitle for "rechat": Unable to download webpage: HTTP Error 401: Unauthorized (caused by HTTPError())
```

It works without the `--cookies` argument for public VODs, but then I can't download subscribers-only VODs. Without `--cookies`, I would get `ERROR: Failed to download m3u8 information: HTTP Error 403: Forbidden` for subs-only VODs.