1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-06-16 08:25:33 +00:00

[ie/youtube] Fix geo-restriction error handling (#13217)

Authored by: yozel
This commit is contained in:
Yasin Özel 2025-05-20 23:39:27 +02:00 committed by GitHub
parent 31e090cb78
commit c7e575e316
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3755,7 +3755,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
reason = self._get_text(pemr, 'reason') or get_first(playability_statuses, 'reason')
subreason = clean_html(self._get_text(pemr, 'subreason') or '')
if subreason:
if subreason == 'The uploader has not made this video available in your country.':
if subreason.startswith('The uploader has not made this video available in your country'):
countries = get_first(microformats, 'availableCountries')
if not countries:
regions_allowed = search_meta('regionsAllowed')