Add tests for keek

This commit is contained in:
Philipp Hagemeister 2013-02-08 11:00:28 +01:00
parent da06e2daf8
commit f0877a445e
2 changed files with 13 additions and 3 deletions

View file

@ -276,5 +276,15 @@
} }
} }
] ]
},
{
"name": "Keek",
"url": "http://www.keek.com/ytdl/keeks/NODfbab",
"file": "NODfbab.mp4",
"md5": "9b0636f8c0f7614afa4ea5e4c6e57e83",
"info_dict": {
"title": "test chars: \"'/\\ä<>This is a test video for youtube-dl.For more information, contact phihag@phihag.de ."
}
} }
] ]

View file

@ -3955,9 +3955,9 @@ def _real_extract(self, url):
thumbnail = u'http://cdn.keek.com/keek/thumbnail/%s/w100/h75' % video_id thumbnail = u'http://cdn.keek.com/keek/thumbnail/%s/w100/h75' % video_id
webpage = self._download_webpage(url, video_id) webpage = self._download_webpage(url, video_id)
m = re.search(r'<meta property="og:title" content="(?P<title>.+)"', webpage) m = re.search(r'<meta property="og:title" content="(?P<title>.+)"', webpage)
title = m.group('title') title = unescapeHTML(m.group('title'))
m = re.search(r'<div class="bio-names-and-report">[\s\n]+<h4>(?P<uploader>\w+)</h4>', webpage) m = re.search(r'<div class="bio-names-and-report">[\s\n]+<h4>(?P<uploader>\w+)</h4>', webpage)
uploader = m.group('uploader') uploader = unescapeHTML(m.group('uploader'))
info = { info = {
'id':video_id, 'id':video_id,
'url':video_url, 'url':video_url,
@ -3965,7 +3965,7 @@ def _real_extract(self, url):
'title': title, 'title': title,
'thumbnail': thumbnail, 'thumbnail': thumbnail,
'uploader': uploader 'uploader': uploader
} }
return [info] return [info]
def gen_extractors(): def gen_extractors():