{"record":{"id":"37afa93136a05b14","repo":"ytdl-org/youtube-dl","slug":"msg","errorCode":null,"errorMessage":"msg","messagePattern":"msg","errorType":"exception","errorClass":"ExtractorError","httpStatus":null,"severity":"error","filePath":"youtube_dl/extractor/yahoo.py","lineNumber":397,"sourceCode":"            'https://gyao.yahoo.co.jp/apis/playback/graphql', video_id, query={\n                'appId': 'dj00aiZpPUNJeDh2cU1RazU3UCZzPWNvbnN1bWVyc2VjcmV0Jng9NTk-',\n                'query': '''{\n  content(parameter: {contentId: \"%s\", logicaAgent: PC_WEB}) {\n    video {\n      delivery {\n        id\n      }\n      title\n    }\n  }\n}''' % video_id,\n            }, headers=headers)\n        content = resp['data']['content']\n        if not content:\n            msg = resp['errors'][0]['message']\n            if msg == 'not in japan':\n                self.raise_geo_restricted(countries=['JP'])\n            raise ExtractorError(msg)\n        video = content['video']\n        return {\n            '_type': 'url_transparent',\n            'id': video_id,\n            'title': video['title'],\n            'url': smuggle_url(\n                'http://players.brightcove.net/4235717419001/SyG5P0gjb_default/index.html?videoId=' + video['delivery']['id'],\n                {'geo_countries': ['JP']}),\n            'ie_key': BrightcoveNewIE.ie_key(),\n        }\n\n\nclass YahooGyaOIE(InfoExtractor):\n    IE_NAME = 'yahoo:gyao'\n    _VALID_URL = r'https?://(?:gyao\\.yahoo\\.co\\.jp/(?:p|title(?:/[^/]+)?)|streaming\\.yahoo\\.co\\.jp/p/y)/(?P<id>\\d+/v\\d+|[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12})'\n    _TESTS = [{\n        'url': 'https://gyao.yahoo.co.jp/p/00449/v03102/',\n        'info_dict': {","sourceCodeStart":379,"sourceCodeEnd":415,"githubUrl":"https://github.com/ytdl-org/youtube-dl/blob/956b8c585591b401a543e409accb163eeaaa1193/youtube_dl/extractor/yahoo.py#L379-L415","documentation":"Raised by the Yahoo Japan extractor when the GraphQL response to the video query returns empty data.content. The code takes resp['errors'][0]['message'] as the error; the special value 'not in japan' is converted into a geo-restriction error for JP, but any other GraphQL error message is raised verbatim as an ExtractorError (not marked expected).","triggerScenarios":"Querying Yahoo Japan's GraphQL endpoint for a video_id where content comes back null and errors[] is populated — typically 'not in japan' for foreign IPs, or invalid/expired video IDs.","commonSituations":"Accessing Yahoo!Vision/GYAO Japan content from outside Japan without a JP IP; videos whose streaming rights expired; using a VPN endpoint that exits outside Japan.","solutions":["If the message is 'not in japan', route through a Japanese IP or accept the block.","For other messages, verify the video ID is still valid on the Yahoo Japan site.","Ensure errors[] is non-empty in your own debugging; an empty errors array with null content would raise an IndexError instead."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    info = ydl.extract_info(url)\nexcept GeoRestrictedError:\n    mark_geo_blocked(url, countries=['JP'])\nexcept ExtractorError as e:\n    if str(e) == 'not in japan':\n        mark_geo_blocked(url, countries=['JP'])\n    else:\n        raise","preventionTips":["Use a Japan egress IP for Yahoo Japan video extraction.","Catch GeoRestrictedError first; the 'not in japan' message may arrive as either type.","Validate video IDs against the Yahoo Japan site before bulk jobs."],"tags":["geo-restriction","graphql","api-error","extractor","yahoo","japan"],"backgroundTag":null,"analyzedSha":"956b8c585591b401a543e409accb163eeaaa1193","analyzedAt":"2026-08-14T18:59:47.863Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}