mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-08 09:10:09 +01:00
[vgtv] Improve geo restriction detection
This commit is contained in:
parent
71631862f4
commit
80b59020e0
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
class VGTVIE(XstreamIE):
|
class VGTVIE(XstreamIE):
|
||||||
IE_DESC = 'VGTV, BTTV, FTV, Aftenposten and Aftonbladet'
|
IE_DESC = 'VGTV, BTTV, FTV, Aftenposten and Aftonbladet'
|
||||||
|
_BYPASS_GEO = False
|
||||||
|
|
||||||
_HOST_TO_APPNAME = {
|
_HOST_TO_APPNAME = {
|
||||||
'vgtv.no': 'vgtv',
|
'vgtv.no': 'vgtv',
|
||||||
@ -217,7 +218,7 @@ def _real_extract(self, url):
|
|||||||
properties = try_get(
|
properties = try_get(
|
||||||
data, lambda x: x['streamConfiguration']['properties'], list)
|
data, lambda x: x['streamConfiguration']['properties'], list)
|
||||||
if properties and 'geoblocked' in properties:
|
if properties and 'geoblocked' in properties:
|
||||||
raise self.raise_geo_restricted()
|
raise self.raise_geo_restricted(countries=['NO'])
|
||||||
|
|
||||||
self._sort_formats(info['formats'])
|
self._sort_formats(info['formats'])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user