mirror of https://github.com/yt-dlp/yt-dlp.git
[ie/mtv] Fix geoblock bypass for mtv.it and mtv.de
This commit is contained in:
parent
fc5e46d2a5
commit
2c0c042e75
|
@ -522,6 +522,12 @@ class MTVDEIE(MTVServicesInfoExtractor):
|
|||
'mgid': uri,
|
||||
}
|
||||
|
||||
def _extract_mgid(self, webpage):
|
||||
mgid = super()._extract_mgid(webpage)
|
||||
# if accessing outside of geo-restrictions, mgid will contain invalid mtv.intl domain instead of correct mtv.de domain
|
||||
if mgid:
|
||||
return mgid.replace('mtv.intl', 'mtv.de')
|
||||
|
||||
|
||||
class MTVItaliaIE(MTVServicesInfoExtractor):
|
||||
IE_NAME = 'mtv.it'
|
||||
|
@ -550,6 +556,12 @@ class MTVItaliaIE(MTVServicesInfoExtractor):
|
|||
'mgid': uri,
|
||||
}
|
||||
|
||||
def _extract_mgid(self, webpage):
|
||||
mgid = super()._extract_mgid(webpage)
|
||||
# if accessing outside of geo-restrictions, mgid will contain invalid mtv.intl domain instead of correct mtv.it domain
|
||||
if mgid:
|
||||
return mgid.replace('mtv.intl', 'mtv.it')
|
||||
|
||||
|
||||
class MTVItaliaProgrammaIE(MTVItaliaIE): # XXX: Do not subclass from concrete IE
|
||||
IE_NAME = 'mtv.it:programma'
|
||||
|
|
Loading…
Reference in New Issue