projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9bb2c76
)
[anvato] Add ability to bypass geo restriction
author
Sergey M․
<dstftw@gmail.com>
Sat, 14 Oct 2017 23:11:02 +0000
(06:11 +0700)
committer
Sergey M․
<dstftw@gmail.com>
Sat, 14 Oct 2017 23:11:02 +0000
(06:11 +0700)
youtube_dl/extractor/anvato.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/anvato.py
b/youtube_dl/extractor/anvato.py
index e443ecff6e2c40d2cc35f07693d156fc979c38aa..7a29cd2c6315fad6caa05ac6a499f07f80a41566 100644
(file)
--- a/
youtube_dl/extractor/anvato.py
+++ b/
youtube_dl/extractor/anvato.py
@@
-18,6
+18,7
@@
from ..utils import (
int_or_none,
strip_jsonp,
unescapeHTML,
+ unsmuggle_url,
)
@@
-275,6
+276,9
@@
class AnvatoIE(InfoExtractor):
anvplayer_data['accessKey'], anvplayer_data['video'])
def _real_extract(self, url):
+ url, smuggled_data = unsmuggle_url(url, {})
+ self._initialize_geo_bypass(smuggled_data.get('geo_countries'))
+
mobj = re.match(self._VALID_URL, url)
access_key, video_id = mobj.group('access_key_or_mcp', 'id')
if access_key not in self._ANVACK_TABLE: