projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[pornhd] Fix title extraction (Closes #7596)
[youtube-dl]
/
youtube_dl
/
extractor
/
canalc2.py
diff --git
a/youtube_dl/extractor/canalc2.py
b/youtube_dl/extractor/canalc2.py
index ba82bb2b73d8f19933e42543b10650124edab11c..f6a1ff381a61af338fd7dec2419aaadfa1081c8b 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):
@@
-15,8
+16,9
@@
class Canalc2IE(InfoExtractor):
'md5': '060158428b650f896c542dfbb3d6487f',
'info_dict': {
'id': '12163',
'md5': '060158428b650f896c542dfbb3d6487f',
'info_dict': {
'id': '12163',
- 'ext': 'mp4',
- 'title': 'Terrasses du Numérique'
+ 'ext': 'flv',
+ 'title': 'Terrasses du Numérique',
+ 'duration': 122,
},
'params': {
'skip_download': True, # Requires rtmpdump
},
'params': {
'skip_download': True, # Requires rtmpdump
@@
-42,9
+44,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,
}
}