diff options
author | nyuszika7h <nyuszika7h@gmail.com> | 2021-10-26 18:35:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-26 22:05:20 +0530 |
commit | bd1c7923274962e3027acf63111ccb0d766b9725 (patch) | |
tree | a7bfbb127c693c24916110595d8ed2c6fefd28fa | |
parent | dc88e9be03ea0974760725d1ad089b91a7fefe52 (diff) | |
download | hypervideo-pre-bd1c7923274962e3027acf63111ccb0d766b9725.tar.lz hypervideo-pre-bd1c7923274962e3027acf63111ccb0d766b9725.tar.xz hypervideo-pre-bd1c7923274962e3027acf63111ccb0d766b9725.zip |
[wakanim] Detect geo-restriction (#1429)
Authored by: nyuszika7h
-rw-r--r-- | yt_dlp/extractor/wakanim.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/yt_dlp/extractor/wakanim.py b/yt_dlp/extractor/wakanim.py index 22441c38f..a61a630e2 100644 --- a/yt_dlp/extractor/wakanim.py +++ b/yt_dlp/extractor/wakanim.py @@ -33,12 +33,19 @@ class WakanimIE(InfoExtractor): 'url': 'https://www.wakanim.tv/de/v2/catalogue/episode/7843/sword-art-online-alicization-omu-arc-2-folge-15-omu', 'only_matching': True, }] + _GEO_BYPASS = False def _real_extract(self, url): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) + if 'Geoblocking' in webpage: + if '/de/' in url: + self.raise_geo_restricted(countries=['DE', 'AT', 'CH']) + else: + self.raise_geo_restricted(countries=['RU']) + manifest_url = urljoin(url, self._search_regex( r'file\s*:\s*(["\'])(?P<url>(?:(?!\1).)+)\1', webpage, 'manifest url', group='url')) |