ytdl-org/youtube-dl · error · ExtractorError

msg

Error message

msg

What it means

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).

Source

Thrown at youtube_dl/extractor/yahoo.py:397

            'https://gyao.yahoo.co.jp/apis/playback/graphql', video_id, query={
                'appId': 'dj00aiZpPUNJeDh2cU1RazU3UCZzPWNvbnN1bWVyc2VjcmV0Jng9NTk-',
                'query': '''{
  content(parameter: {contentId: "%s", logicaAgent: PC_WEB}) {
    video {
      delivery {
        id
      }
      title
    }
  }
}''' % video_id,
            }, headers=headers)
        content = resp['data']['content']
        if not content:
            msg = resp['errors'][0]['message']
            if msg == 'not in japan':
                self.raise_geo_restricted(countries=['JP'])
            raise ExtractorError(msg)
        video = content['video']
        return {
            '_type': 'url_transparent',
            'id': video_id,
            'title': video['title'],
            'url': smuggle_url(
                'http://players.brightcove.net/4235717419001/SyG5P0gjb_default/index.html?videoId=' + video['delivery']['id'],
                {'geo_countries': ['JP']}),
            'ie_key': BrightcoveNewIE.ie_key(),
        }


class YahooGyaOIE(InfoExtractor):
    IE_NAME = 'yahoo:gyao'
    _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})'
    _TESTS = [{
        'url': 'https://gyao.yahoo.co.jp/p/00449/v03102/',
        'info_dict': {

View on GitHub (pinned to 956b8c5855)

Solutions

  1. If the message is 'not in japan', route through a Japanese IP or accept the block.
  2. For other messages, verify the video ID is still valid on the Yahoo Japan site.
  3. Ensure errors[] is non-empty in your own debugging; an empty errors array with null content would raise an IndexError instead.
Defensive patterns

Strategy: try-catch

Try / catch

try:
    info = ydl.extract_info(url)
except GeoRestrictedError:
    mark_geo_blocked(url, countries=['JP'])
except ExtractorError as e:
    if str(e) == 'not in japan':
        mark_geo_blocked(url, countries=['JP'])
    else:
        raise

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14). Data as JSON: /api/errors/37afa93136a05b14. Report an issue: GitHub.