Improve geo bypass mechanism

* Introduce geo bypass context
* Add ability to bypass based on IP blocks in CIDR notation
* Introduce --geo-bypass-ip-block
This commit is contained in:
Sergey M․ 2018-05-02 07:18:01 +07:00
parent a93ce61bd5
commit 5f95927a62
No known key found for this signature in database
GPG key ID: 2C393E0F18A9236D
11 changed files with 113 additions and 28 deletions

View file

@ -102,7 +102,9 @@ class DPlayIE(InfoExtractor):
display_id = mobj.group('id')
domain = mobj.group('domain')
self._initialize_geo_bypass([mobj.group('country').upper()])
self._initialize_geo_bypass({
'countries': [mobj.group('country').upper()],
})
webpage = self._download_webpage(url, display_id)