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

Extractor error has occured #26441

Open
shivasagarrao opened this issue Aug 26, 2020 · 3 comments
Open

Extractor error has occured #26441

shivasagarrao opened this issue Aug 26, 2020 · 3 comments

Comments

@shivasagarrao
Copy link

@shivasagarrao shivasagarrao commented Aug 26, 2020

Checklist

  • I'm reporting a broken site support
  • I've verified that I'm running youtube-dl version 2020.07.28
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar issues including closed ones

Verbose log

youtube-dl -v "https://www.hotstar.com/in/tv/aame-katha/1260013166/maheswaris-smart-move/1100040237"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.hotstar.com/in/tv/aame-katha/1260013166/maheswaris-smart-move/1100040237']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2020.07.28
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.19041
[debug] exe versions: none
[debug] Proxy map: {}
[hotstar] 1260013166: Downloading webpage
ERROR: An extractor error has occurred. (caused by KeyError('title',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\extractor\common.py", line 530, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\extractor\hotstar.py", line 116, in _real_extract
KeyError: 'title'
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\extractor\common.py", line 530, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\extractor\hotstar.py", line 116, in _real_extract
KeyError: 'title'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\YoutubeDL.py", line 797, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\extractor\common.py", line 543, in extract
youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('title',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Description

How to resolve this error and download the video from hotstar?

@merval
Copy link

@merval merval commented Aug 30, 2020

Interesting, when pulling the content for that link, the 'contentId' youtube-dl is calling out is listed under a section called "legacy_details", so the value returned as "video_data" is None, which throws a KeyError.

for v in app_state.values():
content = try_get(v, getters, dict)
if content and content.get('contentId') == video_id:
video_data = content
break
title = video_data['title']

There are three items in app_state.values() on line 110, the first is the one we want and the other two are None. But because of the nested 'contentId', we can't find it.
Here is the json output of the content for the link 'https://www.hotstar.com/in/tv/aame-katha/1260013166/maheswaris-smart-move/1100040237'
It should be noted the video_id called out is '1260013166' which is nested under the 'legacy_details', however the 'contentId' at the parent level is '1100040237', both of which are listed in the URL above at different places.
EDIT: the Key name likely changed from 'contentId' to 'showContentId' since the video_id is listed there too.

{
    "isSubTagged":False,
    "features":[],
    "adGroupId":"hs_in_tv_season_7162,p_big_synergy",
    "id":744612,
    "contentId":"1100040237",
    "broadcastDate":1598371200,
    "duration":1304,
    "genre":"Drama",
    "genres":[
        "Drama"
    ],
    "drmProtected":False,
    "seasonNo":1,
    "contentTitle":"Maheswari's Smart Move",
    "contentProvider":"BIG Synergy",
    "playbackUri":"https://api.hotstar.com/h/v1/play?contentId=1100040237",
    "isNew":False,
    "lang":"Telugu",
    "showId":2383,
    "showContentId":"1260013166",
    "showName":"Aame Katha",
    "channelName":"Star Maa",
    "channelId":10,
    "description":"Maheswari comes up with a clever plan to teach Rani a lesson. Later, Nakshatra gets upset after learning about Shyamala Devi's decision.",
    "disney":False,
    "fox":False,
    "live":False,
    "premium":False,
    "vip":False,
    "playbackType":"INTERNAL",
    "publishDate":1598371200000,
    "seasonId":7162,
    "seriesId":2383,
    "seasonName":"Chapter 1",
    "contentType":"EPISODE",
    "type":"EPISODE",
    "startDate":1598315400,
    "originalReq":{
        "pathVars":{
            "contentId":"1100040237",
            "siMatchId":"None",
            "channel":"PCTV",
            "appVersion":"5.0.40"
        },
        "type":"EPISODE",
        "config":{
            "CUE_POINT_URL":"https://secure-media.hotstar.com/xml/[ID_MOD_100]/[ID]-midroll.xml",
            "SNP_RATINGS":"https://secure-media.hotstar.com/json/snp-ratings.json",
            "region":""
        },
        "addnlParams":{
            "context":"VIDEO",
            "isSubscribed":False
        },
        "querystring":{
            "tao":0,
            "tas":20,
            "contentId":1100040237
        },
        "watchPage":True
    },
    "meta":{
        "contentTitle":"Maheswari's Smart Move",
        "contentId":"1100040237",
        "episodeTitle":"Maheswari's Smart Move",
        "seriesName":"Aame Katha",
        "contentType":"EPISODE",
        "seasonName":"Chapter 1",
        "seasonNo":1,
        "episodeNo":147,
        "broadcastDate":"2020-08-25T16:00:00.000Z",
        "isPremium":False,
        "isLive":False,
        "isReplay":False,
        "isHighlight":False,
        "duration":1304,
        "pcExtendedRatings":"",
        "variantlist":[
            
        ],
        "legacy_details":{
            "id":744612,
            "crisp":"Violence, Language",
            "title":"Maheswari's Smart Move",
            "contentId":"1100040237",
            "avsContentId":1100040237,
            "detail":"Moderate violence, Some coarse language",
            "parentalRating":2,
            "parentalRatingName":"PG",
            "contentProvider":"BIG Synergy",
            "cpDisplayName":"BIG Synergy",
            "cpLogoUrl":"https://secure-media.hotstar.com/static/NewsV2/PartnerLogos/hotstar.png",
            "playbackUri":"https://api.hotstar.com/h/v1/play?contentId=1100040237",
            "contentType":"EPISODE",
            "duration":1304,
            "description":"Maheswari comes up with a clever plan to teach Rani a lesson. Later, Nakshatra gets upset after learning about Shyamala Devi's decision.",
            "productionHouse":"Unknown",
            "encrypted":False,
            "disney":False,
            "fox":False,
            "castEnabled":True,
            "jioBasePack":False,
            "premium":False,
            "vip":False,
            "hboContent":False,
            "downloadable":True,
            "genre":[
                "Drama"
            ],
            "lang":[
                "Telugu"
            ],
            "startDate":1598315400,
            "endDate":4102424940,
            "broadCastDate":1598371200,
            "orientation":"HORIZONTAL",
            "packageIds":[
                1
            ],
            "adGroupId":"hs_in_tv_season_7162,p_big_synergy",
            "live":False,
            "images":{
                "h":"sources/r1/cms/prod/8855/758855-h"
            },
            "imageSets":{
                "DEFAULT":{
                    "h":"sources/r1/cms/prod/8855/758855-h"
                }
            },
            "contentDownloadable":True,
            "monetisable":True,
            "playbackType":"INTERNAL",
            "langObjs":[
                {
                    "hide":False,
                    "id":10,
                    "name":"Telugu",
                    "iso3code":"tel",
                    "detailUrl":"https://api.hotstar.com/o/v1/language/detail?id=10&offset=0&size=20",
                    "displayName":"తెలుగు"
                }
            ],
            "genreObjs":[
                {
                    "id":3,
                    "name":"Drama",
                    "detailUrl":"https://api.hotstar.com/o/v1/genre/detail?id=3&offset=0&size=20"
                }
            ],
            "languageSelector":1,
            "drmClass":"NONE",
            "downloadDrmClass":"BEST_EFFORT",
            "contentStartPointSeconds":0,
            "clipType":"VOD",
            "isSocialEnabled":False,
            "isSubTagged":False,
            "showName":"Aame Katha",
            "seasonName":"Chapter 1",
            "episodeNo":147,
            "seasonNo":1,
            "showId":2383,
            "showContentId":"1260013166",
            "seasonId":7162,
            "episodeWithSeasonNo":"S00001E00000147",
            "channelId":10,
            "channelName":"Star Maa",
            "channelObj":{
                "id":10,
                "name":"Star Maa",
                "detailUrl":"https://api.hotstar.com/o/v1/channel/detail?id=10&offset=0&size=20"
            },
            "language":[
                "Telugu"
            ],
            "castDisabled":False
        }
    },
    "title":"Maheswari's Smart Move",
    "directors":"",
    "adult":False,
    "isSubscribedContent":False,
    "parentalRating":2,
    "crisp":"Violence, Language",
    "parentalRatingName":"PG",
    "secondaryTitle":"Maheswari's Smart Move",
    "detail":"Moderate violence, Some coarse language",
    "langObjs":[
        {
            "hide":False,
            "id":10,
            "name":"Telugu",
            "iso3code":"tel",
            "detailUrl":"https://api.hotstar.com/o/v1/language/detail?id=10&offset=0&size=20",
            "displayName":"తెలుగు"
        }
    ],
    "languageSelector":1,
    "clipType":"VOD",
    "monetisable":True,
    "imageSets":{
        "DEFAULT":{
            "h":"sources/r1/cms/prod/8855/758855-h"
        }
    },
    "episodeNo":147,
    "episode":"Episode 147",
    "image":{
        "h":"sources/r1/cms/prod/8855/758855-h"
    },
    "imageAttributes":"None",
    "primaryTitle":"Aame Katha",
    "multiLanguageInfo":[
        
    ],
    "matchData":{
        
    }
}
@Ashish0804
Copy link

@Ashish0804 Ashish0804 commented Sep 11, 2020

@merval can u make PR with the fix pls

@sumit-1988
Copy link

@sumit-1988 sumit-1988 commented Sep 29, 2020

Please make PR to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.