question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Broken] Hotstar.com: ERROR: Unable to download JSON metadata: HTTP Error 403: Forbidden

See original GitHub issue

Checklist

  • [ x] I’m reporting a broken site support
  • [ x] I’ve verified that I’m running yt-dlp version 2021.06.09
  • [ 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

PASTE VERBOSE LOG HERE:

Log-1:

yt-dlp -Fv https://www.hotstar.com/in/tv/yeh-rishta-kya-kehlata-hai/586/kartiks-promise-to-sirat/1000262304
[debug] Command-line config: ['-Fv', 'https://www.hotstar.com/in/tv/yeh-rishta-kya-kehlata-hai/586/kartiks-promise-to-sirat/1000262304']
[debug] Encodings: locale UTF-8, fs utf-8, out utf-8, pref UTF-8
[debug] yt-dlp version 2021.06.09 
[debug] Python version 3.9.5 (CPython 64bit) - Linux-5.13.0-051300rc5-generic-x86_64-with-glibc2.33
[debug] exe versions: ffmpeg 4.3.2-0, ffprobe 4.3.2-0, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[debug] [hotstar] Extracting URL: https://www.hotstar.com/in/tv/yeh-rishta-kya-kehlata-hai/586/kartiks-promise-to-sirat/1000262304
[hotstar] 1000262304: Downloading webpage
[hotstar] 1000262304: Downloading token
ERROR: Unable to download JSON metadata: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); 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.
  File "/home/admn/.local/lib/python3.9/site-packages/yt_dlp/extractor/common.py", line 678, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/home/admn/.local/lib/python3.9/site-packages/yt_dlp/YoutubeDL.py", line 3071, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.9/urllib/request.py", line 523, in open
    response = meth(req, response)
  File "/usr/lib/python3.9/urllib/request.py", line 632, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.9/urllib/request.py", line 561, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 494, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.9/urllib/request.py", line 641, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)


Log-2:

yt-dlp -fv 'dash-video_avc1_8+dash-audio_only-und-mp4a-2-0' --merge-output-format mp4 https://www.hotstar.com/in/tv/yeh-rishta-kya-kehlata-hai/586/kartiks-promise-to-sirat/1000262304
ERROR: 'dash-video_avc1_8+dash-audio_only-und-mp4a-2-0' is not a valid URL. Set --default-search "ytsearch" (or run  yt-dlp "ytsearch:dash-video_avc1_8+dash-audio_only-und-mp4a-2-0" ) to search YouTube
[hotstar] 1000262304: Downloading webpage
[hotstar] 1000262304: Downloading token
ERROR: Unable to download JSON metadata: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); 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.

Description

WRITE DESCRIPTION HERE:

yt-dlp used to work on Hotstar.com like a week ago, now I’m getting this:

ERROR: Unable to download JSON metadata: HTTP Error 403: Forbidden 

I have tried few different videos from:

(1) Yeh Rishta Kya Kehlata Hai:
Series link:
https://www.hotstar.com/in/tv/yeh-rishta-kya-kehlata-hai/586#!

and 

(2) Saath Nibhaana Saathiya 2:
Series link:
https://www.hotstar.com/in/tv/saath-nibhaana-saathiya/693#!

Direct video (episode) link as an example:

https://www.hotstar.com/in/tv/yeh-rishta-kya-kehlata-hai/586/kartiks-promise-to-sirat/1000262304

but getting same error on every link I’ve tried. The same video does play just fine in browsers (Microsoft Edge for Linux and Chromium).

Thank you so much for yt-dlp.

OS: Ubuntu MATE 21.04 yt-dlp version: 2021.06.09

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
pukkandancommented, Jun 16, 2021

Yes, found the issue. Your PC’s time is out of sync with the server time by 7sec. I was able to reproduce the issue by setting my clock a few seconds ahead.

This is annoying… I will see if I can take the time from the x-origin-date header instead of PC’s time

0reactions
SweetDreamSDcommented, Jan 21, 2022

There is issue with premium content, free content can be download. premium content need authorization for that what can i do, i put --username login_number but there is nothing get otp for sign-in, there is issue arrive. yt-dlp -F --username number “https://www.hotstar.com/in/tv/human/1260077204/the-saviour/1260077206” Type account password and press [Return]: [hotstar] 1260077206: Downloading JSON metadata [hotstar] 1260077206: Downloading webpage [hotstar] 1260077206: Downloading token [hotstar] 1260077206: Downloading JSON metadata ERROR: [hotstar] 1260077206: Unable to download JSON metadata: HTTP Error 401: Unauthorized (caused by <HTTPError 401: ‘Unauthorized’>); 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. (caused by <HTTPError 401: ‘Unauthorized’>); 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.

Please help me out on this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to download JSON metadata: HTTP Error 403 ... - GitHub
ERROR : Unable to download JSON metadata: HTTP Error 403: Forbidden (caused by HTTPError()); please report this issue on https://yt-dl.org/bug .
Read more >
youtube-dl Unable to download JSON metadata: HTTP Error ...
Unable to download JSON metadata : HTTP Error 403: Forbidden. What is the problem ? I Used last version of Youtube-dl
Read more >
[VIU:OTT] Error Unable to download JSON metadata - Reddit
[VIU:OTT] Error Unable to download JSON metadata: HTTP Error 404: Not Found. RE:EDIT: Fixed in latest release 2022.04.08.
Read more >
What Is the 403 Forbidden Error and How to Fix It (8 Methods ...
You might encounter the 403 forbidden error when you visit an empty website directory or a specific page that has a permission error....
Read more >
problem retrieving authentication profile - The Knights of Unity
HTTP 200 status code Azure sandboxes are limited to 1,000 concurrent ... Your runbook fails with a No permission or Forbidden 403 error,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found