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

Hotstar not working anymore #6463

Closed
9 of 10 tasks
justarish opened this issue Mar 7, 2023 · 12 comments · Fixed by #7225
Closed
9 of 10 tasks

Hotstar not working anymore #6463

justarish opened this issue Mar 7, 2023 · 12 comments · Fixed by #7225
Labels
patch-available There is patch available that should fix this issue. Someone needs to make a PR with it site-bug Issue with a specific website

Comments

@justarish
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

  • I'm reporting a bug unrelated to a specific site
  • I've verified that I'm running yt-dlp version 2023.03.04 (update instructions) or later (specify commit)
  • I've checked that all provided URLs are playable in a browser with the same IP and same login details
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched known issues and the bugtracker for similar issues including closed ones. DO NOT post duplicates
  • I've read the guidelines for opening an issue

Provide a description that is worded well enough to be understood

Hello all,

I hope I'm not making a mistake by opening this topic. I have a subscription with hotstar, I have been using yt-dlp for this for a long time. Since yesterday the website has changed and it no longer works. hopefully somebody can help me. I can't find any existing issue about this. Thanks in advance.

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

yt-dlp -vU -F --cookies-from-browser chrome https://www.hotstar.com/in/shows/anupama/1260022017/anupama-anuj-share-a-moment/1000282843
[debug] Command-line config: ['-vU', '-F', '--cookies-from-browser', 'chrome', 'https://www.hotstar.com/in/shows/anupama/1260022017/anupama-anuj-share-a-moment/1000282843']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version stable@2023.03.04 [392389b7d] (darwin_exe)
[debug] Python 3.8.9 (CPython x86_64 64bit) - macOS-12.6.1-x86_64-i386-64bit (LibreSSL 2.8.3)
[debug] exe versions: ffmpeg 6.0-tessus (setts), ffprobe 6.0-tessus
[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: "/Users/arishramsaran/Library/Application Support/Google/Chrome/Default/Cookies"
[debug] using find-generic-password to obtain password from OSX keychain
[Cookies] Extracted 3099 cookies from chrome
[debug] cookie version breakdown: {'v10': 3048, 'other': 0, 'unencrypted': 51}
[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: 1f893f5fb990b1df08820be3fac6c46ee93c0b2f797b72a104bbd485139a8e9d
yt-dlp is up to date (stable@2023.03.04)
[generic] Extracting URL: https://www.hotstar.com/in/shows/anupama/1260022017/anupama-anuj-share-a-moment/1000282843
[generic] 1000282843: Downloading webpage
[redirect] Following redirect to https://www.hotstar.com/in/shows/anupama/1260022017/anupama-anuj-share-a-moment/1000282843/watch
[generic] Extracting URL: https://www.hotstar.com/in/shows/anupama/1260022017/anupama-anuj-share-a-moment/1000282843/watch
[generic] watch: Downloading webpage
WARNING: [generic] Falling back on generic information extractor
[generic] watch: Extracting information
[debug] Looking for embeds
ERROR: Unsupported URL: https://www.hotstar.com/in/shows/anupama/1260022017/anupama-anuj-share-a-moment/1000282843/watch
Traceback (most recent call last):
  File "yt_dlp/YoutubeDL.py", line 1518, in wrapper
  File "yt_dlp/YoutubeDL.py", line 1594, in __extract_info
  File "yt_dlp/extractor/common.py", line 694, in extract
  File "yt_dlp/extractor/generic.py", line 2510, in _real_extract
yt_dlp.utils.UnsupportedError: Unsupported URL: https://www.hotstar.com/in/shows/anupama/1260022017/anupama-anuj-share-a-moment/1000282843/watch
@justarish justarish added bug Bug that is not site-specific triage Untriaged issue labels Mar 7, 2023
@pukkandan

This comment was marked as resolved.

@pukkandan pukkandan added incomplete Further information is needed site-bug Issue with a specific website account-needed Account details are needed to test/fix this and removed bug Bug that is not site-specific triage Untriaged issue labels Mar 7, 2023
@justarish
Copy link
Author

The link doesn't open in browser for me.

  • I've checked that all provided URLs are playable in a browser with the same IP and same login details

Pls double check

Thanks for the quick reply. I just double-checked. It's working fine in the browser.

@pukkandan pukkandan removed the incomplete Further information is needed label Mar 7, 2023
@pukkandan

This comment was marked as resolved.

@justarish

This comment was marked as resolved.

@pukkandan pukkandan mentioned this issue Mar 21, 2023
11 tasks
@pukkandan pukkandan removed the account-needed Account details are needed to test/fix this label Mar 21, 2023
@bashonly
Copy link
Member

it looks like there's a new URL path of /shows/ for some videos, which is not matched by the extractor.
Something like this might work? (I can't test it though; I don't have an account, am not in region, and I get a 400 at the Downloading token stage)

diff --git a/yt_dlp/extractor/hotstar.py b/yt_dlp/extractor/hotstar.py
index cea1812f1..dc793a62c 100644
--- a/yt_dlp/extractor/hotstar.py
+++ b/yt_dlp/extractor/hotstar.py
@@ -83,7 +83,7 @@ class HotStarIE(HotStarBaseIE):
     _VALID_URL = r'''(?x)
         https?://(?:www\.)?hotstar\.com(?:/in)?/(?!in/)
         (?:
-            (?P<type>movies|sports|episode|(?P<tv>tv))/
+            (?P<type>movies|sports|episode|(?P<tv>tv|shows))/
             (?(tv)(?:[^/?#]+/){2}|[^?#]*)
         )?
         [^/?#]+/
@@ -139,6 +139,7 @@ class HotStarIE(HotStarBaseIE):
         'sports': 'match',
         'episode': 'episode',
         'tv': 'episode',
+        'shows': 'episode',
         None: 'content',
     }
 
@@ -304,7 +305,7 @@ def _real_extract(self, url):
 
 class HotStarPlaylistIE(HotStarBaseIE):
     IE_NAME = 'hotstar:playlist'
-    _VALID_URL = r'https?://(?:www\.)?hotstar\.com(?:/in)?/tv(?:/[^/]+){2}/list/[^/]+/t-(?P<id>\w+)'
+    _VALID_URL = r'https?://(?:www\.)?hotstar\.com(?:/in)?/(?:tv|shows)(?:/[^/]+){2}/list/[^/]+/t-(?P<id>\w+)'
     _TESTS = [{
         'url': 'https://www.hotstar.com/tv/savdhaan-india/s-26/list/popular-clips/t-3_2_26',
         'info_dict': {
@@ -327,7 +328,7 @@ def _real_extract(self, url):
 
 class HotStarSeasonIE(HotStarBaseIE):
     IE_NAME = 'hotstar:season'
-    _VALID_URL = r'(?P<url>https?://(?:www\.)?hotstar\.com(?:/in)?/tv/[^/]+/\w+)/seasons/[^/]+/ss-(?P<id>\w+)'
+    _VALID_URL = r'(?P<url>https?://(?:www\.)?hotstar\.com(?:/in)?/(?:tv|shows)/[^/]+/\w+)/seasons/[^/]+/ss-(?P<id>\w+)'
     _TESTS = [{
         'url': 'https://www.hotstar.com/tv/radhakrishn/1260000646/seasons/season-2/ss-8028',
         'info_dict': {
@@ -356,7 +357,7 @@ def _real_extract(self, url):
 
 class HotStarSeriesIE(HotStarBaseIE):
     IE_NAME = 'hotstar:series'
-    _VALID_URL = r'(?P<url>https?://(?:www\.)?hotstar\.com(?:/in)?/tv/[^/]+/(?P<id>\d+))/?(?:[#?]|$)'
+    _VALID_URL = r'(?P<url>https?://(?:www\.)?hotstar\.com(?:/in)?/(?:tv|shows)/[^/]+/(?P<id>\d+))/?(?:[#?]|$)'
     _TESTS = [{
         'url': 'https://www.hotstar.com/in/tv/radhakrishn/1260000646',
         'info_dict': {

@justarish
Copy link
Author

justarish commented Mar 21, 2023 via email

@machasundaram
Copy link

machasundaram commented Mar 23, 2023

seems like all links are being redirected to a "watch" page. Layout changed for the website and its more like a mobile webpage. @bashonly your changes seems to do a little progress but still falling back on generic extractor. Some more changes are required i guess.

@machasundaram
Copy link

I don't know if this will be useful to anyone but modifying the URL (replace "shows" with "tv") works, no need for a extractor update.

@pukkandan pukkandan added the patch-available There is patch available that should fix this issue. Someone needs to make a PR with it label Apr 6, 2023
@pukkandan
Copy link
Member

I don't know if this will be useful to anyone but modifying the URL (replace "shows" with "tv") works, no need for a extractor update.

That effectively verifies @bashonly's patch

@justarish
Copy link
Author

Thanks all!

@shortthirdman
Copy link

I don't know if this will be useful to anyone but modifying the URL (replace "shows" with "tv") works, no need for a extractor update.

Worked for me as well. Thanks buddy @machasundaram .
@pukkandan When will the next stable release be available? Its been more than a month. We are only getting nightly releases

@dirkf
Copy link
Contributor

dirkf commented May 5, 2023

Out of region the playback API (eg, https://api.hotstar.com/play/v1/playback/content/1000076273?...) returns 400 with

{
  'errorCode': 'ERR_PB_1401',
  'message': 'Bad Playback Request',
  'errorDetails': [
    {
      'headerName': 'X-Request-Id',
      'message': 'Missing or Invalid Header X-Request-Id'
    }
  ],
  'additionalInfo': {
  }
}

Where does X-Request-Id come from?

Can this be fixed (at least to return a real geo-block error), or should it just be converted to a GeoRestrictedError?

bashonly added a commit that referenced this issue Jun 4, 2023
aalsuwaidi pushed a commit to aalsuwaidi/yt-dlp that referenced this issue Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-available There is patch available that should fix this issue. Someone needs to make a PR with it site-bug Issue with a specific website
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants