From 82597f0ec0b8ec208e77d27f62904de7804b914d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergey=20M=E2=80=A4?= Date: Fri, 1 Jan 2016 15:41:52 +0600 Subject: [PATCH] [ccc] Extract duration --- youtube_dl/extractor/ccc.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/youtube_dl/extractor/ccc.py b/youtube_dl/extractor/ccc.py index 45115c8387..710e5919ce 100644 --- a/youtube_dl/extractor/ccc.py +++ b/youtube_dl/extractor/ccc.py @@ -5,6 +5,7 @@ import re from .common import InfoExtractor from ..utils import ( int_or_none, + parse_duration, qualities, unified_strdate, ) @@ -25,6 +26,7 @@ class CCCIE(InfoExtractor): 'thumbnail': 're:^https?://.*\.jpg$', 'view_count': int, 'upload_date': '20131228', + 'duration': 3660, } }, { 'url': 'https://media.ccc.de/v/32c3-7368-shopshifting#download', @@ -51,6 +53,9 @@ class CCCIE(InfoExtractor): view_count = int_or_none(self._html_search_regex( r"(?s)(.*?)", webpage, 'view count', fatal=False)) + duration = parse_duration(self._html_search_regex( + r'(?s)]+class=(["\']).*?fa-clock-o.*?\1[^>]*>(?P.+?)(?P.*?)\s* @@ -98,5 +103,6 @@ class CCCIE(InfoExtractor): 'thumbnail': thumbnail, 'view_count': view_count, 'upload_date': upload_date, + 'duration': duration, 'formats': formats, }