aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorRemita Amine <remitamine@gmail.com>2017-11-27 21:59:27 +0100
committerRemita Amine <remitamine@gmail.com>2017-11-27 21:59:27 +0100
commit115afb77ec2d31764307c06866b63ba859d3aafb (patch)
tree7cedd9fde3fedacf409b650294057a8fe5b0bc69 /youtube_dl/extractor
parent53f024e7c5bcea57b2446b3b5550801c011736d1 (diff)
[itv] update hls formats extraction
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/itv.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/youtube_dl/extractor/itv.py b/youtube_dl/extractor/itv.py
index 26c48e4b8..413a219dc 100644
--- a/youtube_dl/extractor/itv.py
+++ b/youtube_dl/extractor/itv.py
@@ -4,6 +4,7 @@ from __future__ import unicode_literals
import uuid
import xml.etree.ElementTree as etree
import json
+import re
from .common import InfoExtractor
from ..compat import (
@@ -142,9 +143,9 @@ class ITVIE(InfoExtractor):
f['url'] = rtmp_url
formats.append(f)
- ios_playlist_url = params.get('data-video-playlist')
+ ios_playlist_url = params.get('data-video-playlist') or params.get('data-video-id')
hmac = params.get('data-video-hmac')
- if ios_playlist_url and hmac:
+ if ios_playlist_url and hmac and re.match(r'https?://', ios_playlist_url):
headers = self.geo_verification_headers()
headers.update({
'Accept': 'application/vnd.itv.vod.playlist.v2+json',
@@ -159,12 +160,12 @@ class ITVIE(InfoExtractor):
'token': ''
},
'device': {
- 'manufacturer': 'Apple',
- 'model': 'iPad',
+ 'manufacturer': 'Safari',
+ 'model': '5',
'os': {
- 'name': 'iPhone OS',
- 'version': '9.3',
- 'type': 'ios'
+ 'name': 'Windows NT',
+ 'version': '6.1',
+ 'type': 'desktop'
}
},
'client': {
@@ -173,10 +174,10 @@ class ITVIE(InfoExtractor):
},
'variantAvailability': {
'featureset': {
- 'min': ['hls', 'aes'],
- 'max': ['hls', 'aes']
+ 'min': ['hls', 'aes', 'outband-webvtt'],
+ 'max': ['hls', 'aes', 'outband-webvtt']
},
- 'platformTag': 'mobile'
+ 'platformTag': 'dotcom'
}
}).encode(), headers=headers, fatal=False)
if ios_playlist: