瀏覽代碼

[YouTube] Improve detection of geo-restriction

Thx yt-dlp
dirkf 3 周之前
父節點
當前提交
25890f2ad1
共有 1 個文件被更改,包括 1 次插入1 次删除
  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')