aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/canalc2.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-10-18 19:27:05 +0600
committerSergey M․ <dstftw@gmail.com>2015-10-18 19:27:05 +0600
commitb1bf063503893192637f95e929d1a9147de59a7e (patch)
tree6fc63599b1ecd7dc0cd8c7931a94df1a1e7955c4 /youtube_dl/extractor/canalc2.py
parent14bddf35fbe8253e283042630e24b134996b2575 (diff)
[canalc2] Extract duration
Diffstat (limited to 'youtube_dl/extractor/canalc2.py')
-rw-r--r--youtube_dl/extractor/canalc2.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/youtube_dl/extractor/canalc2.py b/youtube_dl/extractor/canalc2.py
index ba82bb2b7..e326b8fbd 100644
--- 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
+from ..utils import parse_duration
class Canalc2IE(InfoExtractor):
@@ -42,9 +43,13 @@ class Canalc2IE(InfoExtractor):
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,
- 'formats': formats,
'title': title,
+ 'duration': duration,
+ 'formats': formats,
}