mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-22 16:57:40 +00:00
[animeondemand] Detect geo restriction
This commit is contained in:
parent
daef04a4e7
commit
3e8bb9a972
1 changed files with 4 additions and 0 deletions
|
@ -44,6 +44,10 @@ class AnimeOnDemandIE(InfoExtractor):
|
||||||
login_page = self._download_webpage(
|
login_page = self._download_webpage(
|
||||||
self._LOGIN_URL, None, 'Downloading login page')
|
self._LOGIN_URL, None, 'Downloading login page')
|
||||||
|
|
||||||
|
if '>Our licensing terms allow the distribution of animes only to German-speaking countries of Europe' in login_page:
|
||||||
|
self.raise_geo_restricted(
|
||||||
|
'%s is only available in German-speaking countries of Europe' % self.IE_NAME)
|
||||||
|
|
||||||
login_form = self._form_hidden_inputs('new_user', login_page)
|
login_form = self._form_hidden_inputs('new_user', login_page)
|
||||||
|
|
||||||
login_form.update({
|
login_form.update({
|
||||||
|
|
Loading…
Reference in a new issue