Repository: yt-dlp
Issue: [Oreilly] Log in to O'Reilly with cookies
Labels: account-needed,site-enhancement

<!--

######################################################################
  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 yt-dlp:
- First of, make sure you are using the latest version of yt-dlp. Run `yt-dlp --version` and ensure your version is 2021.09.02. If it's not, see https://github.com/yt-dlp/yt-dlp 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 https://github.com/yt-dlp/yt-dlp.
- Search the bugtracker for similar issues: https://github.com/yt-dlp/yt-dlp. DO NOT post duplicates.
- Read bugs section in FAQ: https://github.com/yt-dlp/yt-dlp
- Finally, put x into all relevant boxes like this [x] (Dont forget to delete the empty space)
-->

- [ ] I'm reporting a bug unrelated to a specific site
- [ ] I've verified that I'm running yt-dlp version **2021.09.02**
- [ ] I've checked that all provided URLs are alive and playable in a browser
- [ ] The provided URLs do not contain any DRM to the best of my knowledge
- [ ] I've checked that all URLs and arguments with special characters are properly quoted or escaped
- [ ] I've searched the bugtracker for similar bug reports including closed ones
- [ ] I've read bugs section in FAQ


## Verbose log

<!--
Provide the complete verbose output of yt-dlp that clearly demonstrates the problem.
Add the `-v` flag to your command line you run yt-dlp with (`yt-dlp -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_jenozKc']
 [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
 [debug] yt-dlp version 2021.09.02
 [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] Command-line config: ['--config-location', 'D:\\Utils/YoutubeDL/Configs/ytdlp_oreilly.conf', '--playlist-items', '2']
[debug] Batch file urls: ['https://learning.oreilly.com/videos/the-principles-of/9781491935811/']
WARNING: You have asked for unplayable formats to be listed/downloaded. This is a developer option intended for debugging. If you experience any issues while using this option, DO NOT open a bug report
WARNING: --add-metadata is ignored since --allow-unplayable-formats was given
WARNING: --embed-subs is ignored since --allow-unplayable-formats was given
WARNING: --embed-thumbnail is ignored since --allow-unplayable-formats was given
[Cookies] Extracting cookies from firefox
[debug] Extracting cookies from: "C:\Users\mh-sh\AppData\Roaming\Mozilla\Firefox\Profiles\8tceuger.default-release\cookies.sqlite"
[Cookies] Extracted 1589 cookies from firefox
[debug] Loading archive file 'archive.txt'

[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] yt-dlp version 2021.09.02 (source)
[debug] Plugin Extractors: ['SamplePlugin']
[debug] Git HEAD: 57aa7b851
[debug] Python version 3.9.1 (CPython 64bit) - Windows-10-10.0.19041-SP0
[debug] exe versions: ffmpeg n4.4-4-gacb339bb88, ffprobe n4.4-4-gacb339bb88
[debug] Optional libraries: sqlite
[debug] Proxy map: {}
[debug] [safari:course] Extracting URL: https://learning.oreilly.com/videos/the-principles-of/9781491935811/
[safari:course] 9781491935811: Downloading course JSON
[download] Downloading playlist: The Principles of Microservices
[info] Writing playlist metadata as JSON to: The Principles of Microservices\0. The Principles of Microservices.info.json
WARNING: There's no playlist description to write.
[safari:course] playlist The Principles of Microservices: Collected 15 videos; downloading 1 of them
[download] Downloading video 1 of 1
[debug] [safari:api] Extracting URL: https://learning.oreilly.com/api/v1/book/9781491935811/chapter/video221406.html
[safari:api] 9781491935811/video221406: Downloading part JSON
[debug] [safari] Extracting URL: https://learning.oreilly.com/videos/the-principles-of/9781491935811/9781491935811-video221406
[debug] [Kaltura] Extracting URL: https://cdnapisec.kaltura.com/html5/html5lib/v2.37.1/mwEmbedFrame.php?wid=_1926081&uiconf_id=29375172&flashvars%5BreferenceId%5D=9781491935811-video221406
[Kaltura] 9781491935811-video221406: Downloading webpage
[Kaltura] 0_1i6jb4o4: Downloading video info JSON
[Kaltura] 0_1i6jb4o4: Checking mp4-4468 URL
[Kaltura] 0_1i6jb4o4: Downloading m3u8 information
WARNING: [Kaltura] Ignoring subtitle tracks found in the HLS manifest; if any subtitle tracks are missing, please report this issue on  https://github.com/yt-dlp/yt-dlp . Make sure you are using the latest version; see  https://github.com/yt-dlp/yt-dlp  on how to update. Be sure to call yt-dlp with the --verbose flag and include its complete output.
[debug] Formats sorted by: hasvid, ie_pref, lang, quality, res, fps, vcodec:vp9.2(10), acodec, filesize, fs_approx, tbr, vbr, abr, asr, proto, vext, aext, hasaud, source, id
[debug] Downloading subtitles: en
[info] Available formats for 0_1i6jb4o4:
ID       EXT RESOLUTION FPS |  FILESIZE    TBR PROTO  | VCODEC    VBR ACODEC     ABR MORE INFO
-------- --- ---------- --- - ---------- ----- ------ - ------- ----- --------- ---- ---------
hls-58   mp4 audio only     |              58k m3u8_n |               mp4a.40.2  58k
mp4-56   mp4 audio only 0   | ~2.16MiB     56k http   |               unknown    56k isom
hls-425  mp4 640x360        |             425k m3u8_n | unknown  425k unknown     0k
hls-571  mp4 640x360        |             571k m3u8_n | unknown  571k unknown     0k
hls-782  mp4 640x360        |             782k m3u8_n | unknown  782k unknown     0k
mp4-385  mp4 640x360    29  | ~14.80MiB   385k http   | avc1     385k unknown     0k isom
mp4-525  mp4 640x360    29  | ~20.20MiB   525k http   | avc1     525k unknown     0k isom
mp4-726  mp4 640x360    29  | ~27.90MiB   726k http   | avc1     726k unknown     0k isom
hls-1319 mp4 1280x720       |            1319k m3u8_n | unknown 1319k unknown     0k
mp4-1240 mp4 1280x720   29  | ~47.60MiB  1240k http   | avc1    1240k unknown     0k isom
mp4-1966 mp4 1280x720   29  | ~75.40MiB  1966k http   | avc1    1966k unknown     0k isom
mp4-3082 mp4 1920x1080  29  | ~118.00MiB 3082k http   | avc1    3082k unknown     0k isom
mp4-4468 mp4 1920x1080  29  | ~171.00MiB 4468k http   | avc1    4468k unknown     0k mp42
[download] Finished downloading playlist: The Principles of Microservices


```
<!--
Do not remove the above ```
-->


## Description

<!--
Provide an explanation of your issue in an arbitrary form. Please make sure the description is worded well enough to be understood, see https://github.com/ytdl-org/youtube-dl#is-the-description-of-the-issue-itself-sufficient. 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.
-->

I tried download oreilly videos using cookies but the downloader is only invoked on the trial duration meaning that the cookies weren't included in the requests and we are treated as not logged in.
The download using user/pass works tho
Relevent info: [here](https://github.com/yt-dlp/yt-dlp/issues/586#issuecomment-920814101)