projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
14bddf3
)
[canalc2] Extract duration
author
Sergey M․
<dstftw@gmail.com>
Sun, 18 Oct 2015 13:27:05 +0000
(19:27 +0600)
committer
Sergey M․
<dstftw@gmail.com>
Sun, 18 Oct 2015 13:27:05 +0000
(19:27 +0600)
youtube_dl/extractor/canalc2.py
patch
|
blob
|
history
diff --git
a/youtube_dl/extractor/canalc2.py
b/youtube_dl/extractor/canalc2.py
index ba82bb2b73d8f19933e42543b10650124edab11c..e326b8fbda3a9daa8784dbd13c0b6cff7c96066e 100644
(file)
--- a/
youtube_dl/extractor/canalc2.py
+++ b/
youtube_dl/extractor/canalc2.py
@@
-4,6
+4,7
@@
from __future__ import unicode_literals
import re
from .common import InfoExtractor
import re
from .common import InfoExtractor
+from ..utils import parse_duration
class Canalc2IE(InfoExtractor):
class Canalc2IE(InfoExtractor):
@@
-42,9
+43,13
@@
class Canalc2IE(InfoExtractor):
title = self._html_search_regex(
r'(?s)class="[^"]*col_description[^"]*">.*?<h3>(.*?)</h3>', webpage, 'title')
title = self._html_search_regex(
r'(?s)class="[^"]*col_description[^"]*">.*?<h3>(.*?)</h3>', webpage, 'title')
+ duration = parse_duration(self._search_regex(
+ r'id=["\']video_duree["\'][^>]*>([^<]+)',
+ webpage, 'duration', fatal=False))
return {
'id': video_id,
return {
'id': video_id,
- 'formats': formats,
'title': title,
'title': title,
+ 'duration': duration,
+ 'formats': formats,
}
}