X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fsportbox.py;h=4f0c66213cc1269f44f4c0d9672a83ba3999d441;hb=f3a58d46bf969b33910479a3a6096635e793a553;hp=a869a1b25aae6ef50208c4082b87353cf025591c;hpb=1436a6835e0f3489a4c37cca3da5087567b68158;p=youtube-dl
diff --git a/youtube_dl/extractor/sportbox.py b/youtube_dl/extractor/sportbox.py
index a869a1b25..4f0c66213 100644
--- a/youtube_dl/extractor/sportbox.py
+++ b/youtube_dl/extractor/sportbox.py
@@ -6,8 +6,7 @@ import re
from .common import InfoExtractor
from ..compat import compat_urlparse
from ..utils import (
- parse_duration,
- parse_iso8601,
+ unified_strdate,
)
@@ -20,11 +19,9 @@ class SportBoxIE(InfoExtractor):
'id': '80822',
'ext': 'mp4',
'title': 'Ðонка 2 заезд ««ÐбÑединеннÑй 2000»: клаÑÑÑ Ð¢ÑÑинг и СÑпеÑ-пÑодакÑн',
- 'description': 'md5:81715fa9c4ea3d9e7915dc8180c778ed',
+ 'description': 'md5:3d72dc4a006ab6805d82f037fdc637ad',
'thumbnail': 're:^https?://.*\.jpg$',
- 'timestamp': 1411896237,
'upload_date': '20140928',
- 'duration': 4846,
},
'params': {
# m3u8 download
@@ -48,17 +45,13 @@ class SportBoxIE(InfoExtractor):
r'src="/?(vdl/player/[^"]+)"', webpage, 'player')
title = self._html_search_regex(
- r'
([^<]+)
', webpage, 'title')
- description = self._html_search_regex(
- r'(?s)(.+?)
',
- webpage, 'description', fatal=False)
+ [r'"nodetitle"\s*:\s*"([^"]+)"', r'class="node-header_{1,2}title">([^<]+)'],
+ webpage, 'title')
+ description = self._og_search_description(webpage) or self._html_search_meta(
+ 'description', webpage, 'description')
thumbnail = self._og_search_thumbnail(webpage)
- timestamp = parse_iso8601(self._search_regex(
- r'([^<]+)',
- webpage, 'timestamp', fatal=False))
- duration = parse_duration(self._html_search_regex(
- r'',
- webpage, 'duration', fatal=False))
+ upload_date = unified_strdate(self._html_search_meta(
+ 'dateCreated', webpage, 'upload date'))
return {
'_type': 'url_transparent',
@@ -67,8 +60,7 @@ class SportBoxIE(InfoExtractor):
'title': title,
'description': description,
'thumbnail': thumbnail,
- 'timestamp': timestamp,
- 'duration': duration,
+ 'upload_date': upload_date,
}
@@ -107,13 +99,14 @@ class SportBoxEmbedIE(InfoExtractor):
webpage, 'hls file')
formats = self._extract_m3u8_formats(hls, video_id, 'mp4')
+ self._sort_formats(formats)
title = self._search_regex(
r'sportboxPlayer\.node_title\s*=\s*"([^"]+)"', webpage, 'title')
thumbnail = self._search_regex(
r'sportboxPlayer\.jwplayer_common_params\.image\s*=\s*"([^"]+)"',
- webpage, 'thumbnail', fatal=False)
+ webpage, 'thumbnail', default=None)
return {
'id': video_id,