1
1
mirror of https://github.com/ytdl-org/youtube-dl synced 2024-11-30 10:22:55 +01:00

[itv] Improve extraction (closes #16253)

This commit is contained in:
Sergey M․ 2018-05-01 22:46:06 +07:00
parent cc42941390
commit c18142da6e
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -41,6 +41,14 @@ class ITVIE(InfoExtractor):
# unavailable via data-playlist-url # unavailable via data-playlist-url
'url': 'https://www.itv.com/hub/through-the-keyhole/2a2271a0033', 'url': 'https://www.itv.com/hub/through-the-keyhole/2a2271a0033',
'only_matching': True, 'only_matching': True,
}, {
# InvalidVodcrid
'url': 'https://www.itv.com/hub/james-martins-saturday-morning/2a5159a0034',
'only_matching': True,
}, {
# ContentUnavailable
'url': 'https://www.itv.com/hub/whos-doing-the-dishes/2a2898a0024',
'only_matching': True,
}] }]
def _real_extract(self, url): def _real_extract(self, url):
@ -127,7 +135,8 @@ class ITVIE(InfoExtractor):
if fault_code == 'InvalidGeoRegion': if fault_code == 'InvalidGeoRegion':
self.raise_geo_restricted( self.raise_geo_restricted(
msg=fault_string, countries=self._GEO_COUNTRIES) msg=fault_string, countries=self._GEO_COUNTRIES)
elif fault_code != 'InvalidEntity': elif fault_code not in (
'InvalidEntity', 'InvalidVodcrid', 'ContentUnavailable'):
raise ExtractorError( raise ExtractorError(
'%s said: %s' % (self.IE_NAME, fault_string), expected=True) '%s said: %s' % (self.IE_NAME, fault_string), expected=True)
info.update({ info.update({