yt-dlp: Hidive not working with --cookies-from-browser

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

  • I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

Region

United Kingdom

Provide a description that is worded well enough to be understood

Currently the --cookies-from-browser feature doesn’t seem to be working with the hidive extractor. When trying to download premium content with cookies from the browser you get the premiumcontent error. When exporting the same cookies to a file and giving them via the --cookies option it works perfectly.

Provide verbose output that clearly demonstrates the problem

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

Complete Verbose Output

[debug] Command-line config: ['--cookies-from-browser', 'chrome', '-vU', 'https://www.hidive.com/stream/reincarnated-as-a-sword/s01e011']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, 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.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg 4.1.3, ffprobe 4.1.3
[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
[Cookies] Extracting cookies from chrome
[debug] Extracting cookies from: "C:\Users\nicho\AppData\Local\Google\Chrome\User Data\Default\Network\Cookies"
[debug] Found local state file at "C:\Users\nicho\AppData\Local\Google\Chrome\User Data\Local State"
[Cookies] Extracted 3040 cookies from chrome
[debug] cookie version breakdown: {'v10': 3040, 'other': 0, 'unencrypted': 0}
[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)
[HiDive] Extracting URL: https://www.hidive.com/stream/reincarnated-as-a-sword/s01e011
[HiDive] reincarnated-as-a-sword/s01e011: Downloading JSON metadata
ERROR: [HiDive] reincarnated-as-a-sword/s01e011: HiDive said: PremiumContent
  File "yt_dlp\extractor\common.py", line 694, in extract
  File "yt_dlp\extractor\hidive.py", line 81, in _real_extract

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 26 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Honestly, I don’t think it’s worthwhile trying to circumvent ReCaptcha and/or AWS WAF security features.

Even if you manage to do it (and it would certainly be interesting), it’ll just turn into a game of cat and mouse. It’s way easier (and more future-proof) to just grab the cookies, even if you have to open hidive.com in a browser from time to time.

I wrote my own script because I don’t trust the Firefox extensions that are available (call me paranoid): https://gist.github.com/Tblue/8c6ee7c29b683dcf3e5dad2ff1edc338

Thanks for that script! The reason my previous command didn’t work is because my alias command is screwed up somehow. If you look at the logs I posted:

[debug] Loaded 1855 extractors
[generic] Extracting URL: ../cookies/Hidive/cookies.txt
ERROR: [generic] None: '../cookies/Hidive/cookies.txt' is not a valid URL.

Using --cookies with your script and not --username works fine for me on the previous URL.

Dumping all cookies for hidive.com (and subdomains), and using the resulting cookie jar (--cookies option) still works for me.

The important thing is to also include session cookies in the cookie jar.