projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[nowtv] Fix extraction (Closes #6169)
[youtube-dl]
/
youtube_dl
/
extractor
/
escapist.py
diff --git
a/youtube_dl/extractor/escapist.py
b/youtube_dl/extractor/escapist.py
index dadfaa6a5058303d2a134ae30f8c61eca1083631..c85b4c458d95882f56675fa135aab1f3492b6194 100644
(file)
--- a/
youtube_dl/extractor/escapist.py
+++ b/
youtube_dl/extractor/escapist.py
@@
-9,6
+9,7
@@
from ..utils import (
determine_ext,
clean_html,
int_or_none,
determine_ext,
clean_html,
int_or_none,
+ float_or_none,
)
)
@@
-47,6
+48,7
@@
class EscapistIE(InfoExtractor):
'title': "Breaking Down Baldur's Gate",
'thumbnail': 're:^https?://.*\.jpg$',
'duration': 264,
'title': "Breaking Down Baldur's Gate",
'thumbnail': 're:^https?://.*\.jpg$',
'duration': 264,
+ 'uploader': 'The Escapist',
}
}, {
'url': 'http://www.escapistmagazine.com/videos/view/zero-punctuation/10044-Evolve-One-vs-Multiplayer',
}
}, {
'url': 'http://www.escapistmagazine.com/videos/view/zero-punctuation/10044-Evolve-One-vs-Multiplayer',
@@
-58,6
+60,7
@@
class EscapistIE(InfoExtractor):
'title': 'Evolve - One vs Multiplayer',
'thumbnail': 're:^https?://.*\.jpg$',
'duration': 304,
'title': 'Evolve - One vs Multiplayer',
'thumbnail': 're:^https?://.*\.jpg$',
'duration': 304,
+ 'uploader': 'The Escapist',
}
}]
}
}]
@@
-65,12
+68,12
@@
class EscapistIE(InfoExtractor):
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
video_id = self._match_id(url)
webpage = self._download_webpage(url, video_id)
- ims
V
ideo = self._parse_json(
+ ims
_v
ideo = self._parse_json(
self._search_regex(
r'imsVideo\.play\(({.+?})\);', webpage, 'imsVideo'),
video_id)
self._search_regex(
r'imsVideo\.play\(({.+?})\);', webpage, 'imsVideo'),
video_id)
- video_id = ims
V
ideo['videoID']
- key = ims
V
ideo['hash']
+ video_id = ims
_v
ideo['videoID']
+ key = ims
_v
ideo['hash']
config_req = compat_urllib_request.Request(
'http://www.escapistmagazine.com/videos/'
config_req = compat_urllib_request.Request(
'http://www.escapistmagazine.com/videos/'
@@
-80,8
+83,11
@@
class EscapistIE(InfoExtractor):
data = json.loads(_decrypt_config(key, config))
data = json.loads(_decrypt_config(key, config))
- title = clean_html(data['videoData']['title'])
- duration = data['videoData']['duration'] / 1000
+ video_data = data['videoData']
+
+ title = clean_html(video_data['title'])
+ duration = float_or_none(video_data.get('duration'), 1000)
+ uploader = video_data.get('publisher')
formats = [{
'url': video['src'],
formats = [{
'url': video['src'],
@@
-97,4
+103,5
@@
class EscapistIE(InfoExtractor):
'thumbnail': self._og_search_thumbnail(webpage),
'description': self._og_search_description(webpage),
'duration': duration,
'thumbnail': self._og_search_thumbnail(webpage),
'description': self._og_search_description(webpage),
'duration': duration,
+ 'uploader': uploader,
}
}