ytdl-org/youtube-dl · error · GeoRestrictedError
This video is not available from your location due to geo re
Error message
This video is not available from your location due to geo restriction
What it means
Error "This video is not available from your location due to geo restriction" thrown in ytdl-org/youtube-dl.
Source
Thrown at youtube_dl/extractor/common.py:1018
self.to_screen('%s: Downloading webpage' % video_id)
def report_age_confirmation(self):
"""Report attempt to confirm age."""
self.to_screen('Confirming age')
def report_login(self):
"""Report attempt to log in."""
self.to_screen('Logging in')
@staticmethod
def raise_login_required(msg='This video is only available for registered users'):
raise ExtractorError(
'%s. Use --username and --password or --netrc to provide account credentials.' % msg,
expected=True)
@staticmethod
def raise_geo_restricted(msg='This video is not available from your location due to geo restriction', countries=None):
raise GeoRestrictedError(msg, countries=countries)
def raise_no_formats(self, msg, expected=False, video_id=None):
if expected and (
self.get_param('ignore_no_formats_error') or self.get_param('wait_for_video')):
self.report_warning(msg, video_id)
elif isinstance(msg, ExtractorError):
raise msg
else:
raise ExtractorError(msg, expected=expected, video_id=video_id)
# Methods for following #608
@staticmethod
def url_result(url, ie=None, video_id=None, video_title=None):
"""Returns a URL that points to a page that should be processed"""
# TODO: ie should be the class used for getting the info
video_info = {'_type': 'url',
'url': url,
'ie_key': ie}View on GitHub (pinned to 956b8c5855)
Solutions
- Use --proxy with a server located in an allowed region to bypass the geo restriction.
When it happens
Trigger: Thrown at youtube_dl/extractor/common.py:1018 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14).
Data as JSON: /api/errors/0d1bc5ab011d045b.
Report an issue: GitHub.