1
0
mirror of https://github.com/ytdl-org/youtube-dl synced 2025-12-04 10:33:48 +00:00

[YouTube] Improve detection of geo-restriction

Thx yt-dlp
This commit is contained in:
dirkf 2025-11-04 21:45:12 +00:00
parent d65882a022
commit 25890f2ad1

View File

@ -2787,7 +2787,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
subreason = pemr.get('subreason') subreason = pemr.get('subreason')
if subreason: if subreason:
subreason = clean_html(get_text(subreason)) subreason = clean_html(get_text(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 = microformat.get('availableCountries') countries = microformat.get('availableCountries')
if not countries: if not countries:
regions_allowed = search_meta('regionsAllowed') regions_allowed = search_meta('regionsAllowed')