Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TubiTV] Unable to download JSON metadata: HTTP Error 401: Unauthorized #9937

Closed
10 of 11 tasks
MariposaJim opened this issue May 16, 2024 · 11 comments · Fixed by #9975
Closed
10 of 11 tasks

[TubiTV] Unable to download JSON metadata: HTTP Error 401: Unauthorized #9937

MariposaJim opened this issue May 16, 2024 · 11 comments · Fixed by #9975
Labels
site-bug Issue with a specific website

Comments

@MariposaJim
Copy link

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

US

Provide a description that is worded well enough to be understood

[TubiTV.com] When downloading videos from TubiTV.com I am now receiving Unauthorized when the video was previously downloaded without error. For example: Guest House (2020)

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: ['-vU', 'https://tubitv.com/movies/659818/guest-house']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2024.04.09 from yt-dlp/yt-dlp [ff0779267] (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 2023-02-27-git-891ed24f77-essentials_build-www.gyan.dev (setts), ffprobe 2023-02-27-git-891ed24f77-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.20.0, brotli-1.1.0, certifi-2024.02.02, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.31.0, sqlite3-3.35.5, urllib3-2.2.1, websockets-12.0
[debug] Proxy map: {}
[debug] Request Handlers: urllib, requests, websockets, curl_cffi
[debug] Loaded 1810 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: stable@2024.04.09 from yt-dlp/yt-dlp
yt-dlp is up to date (stable@2024.04.09 from yt-dlp/yt-dlp)
[debug] Using fake IP 6.197.217.81 (US) as X-Forwarded-For
[TubiTv] Extracting URL: https://tubitv.com/movies/659818/guest-house
[TubiTv] 659818: Downloading JSON metadata
ERROR: [TubiTv] 659818: Unable to download JSON metadata: HTTP Error 401: Unauthorized (caused by <HTTPError 401: Unauthorized>)
  File "yt_dlp\extractor\common.py", line 734, in extract
  File "yt_dlp\extractor\tubitv.py", line 85, in _real_extract
  File "yt_dlp\extractor\common.py", line 1127, in download_content
  File "yt_dlp\extractor\common.py", line 1087, in download_handle
  File "yt_dlp\extractor\common.py", line 954, in _download_webpage_handle
  File "yt_dlp\extractor\common.py", line 903, in _request_webpage

  File "yt_dlp\extractor\common.py", line 890, in _request_webpage
  File "yt_dlp\YoutubeDL.py", line 4131, in urlopen
  File "yt_dlp\networking\common.py", line 115, in send
  File "yt_dlp\networking\_helper.py", line 208, in wrapper
  File "yt_dlp\networking\common.py", line 335, in send
  File "yt_dlp\networking\_requests.py", line 350, in _send
yt_dlp.networking.exceptions.HTTPError: HTTP Error 401: Unauthorized
@MariposaJim MariposaJim added site-bug Issue with a specific website triage Untriaged issue labels May 16, 2024
@Gnoflet
Copy link

Gnoflet commented May 17, 2024

I'm having the same issue. I was told in the discord it was due to a site change.

@lalenguanegra
Copy link

To resolve the issue, use the --cookies-from-browser flag with yt-dlp. Execute the following command:

yt-dlp "VIDEO_ID" --cookies-from-browser brave

This will allow the video to download without encountering any 401 errors.

image

@waqaskaloi

This comment was marked as spam.

@bashonly
Copy link
Member

@lalenguanegra do you need to be logged into the site? or do you just need to have browsed it recently without logging in?

@lalenguanegra
Copy link

@lalenguanegra do you need to be logged into the site? or do you just need to have browsed it recently without logging in?

To clarify, logging in is not necessary. You just need to have browsed it recently without being logged in.

@stanclamm
Copy link

stanclamm commented May 19, 2024

this solution doesn't work for me. i tried:

B:\youtube-dl>yt-dlp "https://tubitv.com/movies/563229/ember-days" --cookies-from-browser firefox
[TubiTv] Extracting URL: https://tubitv.com/movies/563229/ember-days
[TubiTv] 563229: Downloading JSON metadata
Extracting cookies from firefox
Extracted 0 cookies from firefox
ERROR: [TubiTv] 563229: Unable to download JSON metadata: HTTP Error 401: Unauthorized (caused by <HTTPError 401: Unauthorized>)

i have enabled cookies for https://tubitv.com and have visited the site and started streaming a video. i don't know how to get the cookies that are necessary to download. i also tried the same procedure with chrome. no luck.

@bashonly
Copy link
Member

bashonly commented May 19, 2024

Try yt-dlp nightly with chrome. Could possibly be session cookies, which aren't extracted with yt-dlp stable or from firefox

@stanclamm
Copy link

updated to nightly@2024.05.18.232655. i tried chrome and firefox again. same 401 output. i usually have my browsers set to strict privacy, no tracking/cookies, etc and had to add exceptions for tubitv. do you think it would work if i installed another browser, didn't enable privacy settings on it, then visited tubitv for cookies? thank you.

@MariposaJim
Copy link
Author

MariposaJim commented May 19, 2024 via email

@stanclamm
Copy link

i got it to work. i installed yt-dlp-ChromeCookieUnlock plugin and away she goes.
thank you for your help. i love tubitv's terrible movies so much.

@bashonly
Copy link
Member

The failing API request specifically needs the at cookie (auth token)

@chilinux chilinux mentioned this issue May 20, 2024
9 tasks
@bashonly bashonly removed the triage Untriaged issue label May 21, 2024
@bashonly bashonly changed the title TubiTV.com gives Unauthorized on all downloads [TubiTV] Unable to download JSON metadata: HTTP Error 401: Unauthorized May 26, 2024
bashonly pushed a commit that referenced this issue May 29, 2024
Closes #9937
Authored by: chilinux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site-bug Issue with a specific website
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants