projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
29cad7a
)
[escapist] Extract duration
author
Philipp Hagemeister
<phihag@phihag.de>
Sat, 28 Feb 2015 19:52:52 +0000
(20:52 +0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Sat, 28 Feb 2015 19:52:52 +0000
(20:52 +0100)
youtube_dl/extractor/escapist.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/escapist.py
b/youtube_dl/extractor/escapist.py
index 80e9084f41ffd751ed407cbd9b79138fd4627140..e47f3e27a57aa14e3eee526af8998230b524bb4f 100644
(file)
--- a/
youtube_dl/extractor/escapist.py
+++ b/
youtube_dl/extractor/escapist.py
@@
-8,6
+8,7
@@
from ..compat import (
from ..utils import (
ExtractorError,
js_to_json,
from ..utils import (
ExtractorError,
js_to_json,
+ parse_duration,
)
)
@@
-25,6
+26,7
@@
class EscapistIE(InfoExtractor):
'uploader': 'The Escapist Presents',
'title': "Breaking Down Baldur's Gate",
'thumbnail': 're:^https?://.*\.jpg$',
'uploader': 'The Escapist Presents',
'title': "Breaking Down Baldur's Gate",
'thumbnail': 're:^https?://.*\.jpg$',
+ 'duration': 264,
}
}
}
}
@@
-41,6
+43,7
@@
class EscapistIE(InfoExtractor):
r"<h1\s+class='headline'>(.*?)</a>",
webpage, 'uploader', fatal=False)
description = self._html_search_meta('description', webpage)
r"<h1\s+class='headline'>(.*?)</a>",
webpage, 'uploader', fatal=False)
description = self._html_search_meta('description', webpage)
+ duration = parse_duration(self._html_search_meta('duration', webpage))
raw_title = self._html_search_meta('title', webpage, fatal=True)
title = raw_title.partition(' : ')[2]
raw_title = self._html_search_meta('title', webpage, fatal=True)
title = raw_title.partition(' : ')[2]
@@
-105,6
+108,7
@@
class EscapistIE(InfoExtractor):
'title': title,
'thumbnail': self._og_search_thumbnail(webpage),
'description': description,
'title': title,
'thumbnail': self._og_search_thumbnail(webpage),
'description': description,
+ 'duration': duration,
}
if self._downloader.params.get('include_ads') and ad_formats:
}
if self._downloader.params.get('include_ads') and ad_formats: