Browse Source

[YouTube] Improve detection of geo-restriction

Thx yt-dlp
dirkf 3 tuần trước cách đây
mục cha
commit
25890f2ad1
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      youtube_dl/extractor/youtube.py

+ 1 - 1
youtube_dl/extractor/youtube.py

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