[youtube] fix the fancy georestricted error

unlicense
Lauren Liberda 2021-06-20 23:00:58 +02:00 committed by Dominika
parent 09c16b979a
commit 3cd3edc116
1 changed files with 1 additions and 2 deletions

View File

@ -1814,8 +1814,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
error_desc,
countries=self._search_regex(
r'<meta itemprop="regionsAllowed" content="((?:(?:[A-Z]{2},)*[A-Z]{2})?)">',
video_webpage, 'allowed region list').split(','),
expected=True)
video_webpage, 'allowed region list').split(','))
if error_desc and 'Playback on other websites has been disabled' in error_desc:
raise ExtractorError(
'Embeds disabled for this video, account (with passed credit card or photo ID check, if in EU/EEA/CH/UK) is required',