X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Fextractor%2Fkeek.py;h=7e1a3f67c84153592830978427c7c22a13dd645f;hb=817690ff736c276835e16860957d758d92afb2fd;hp=280134a2ae9fde0c8f67d850f0d50c38307d8b00;hpb=80e98aed69102b0f300ac69001ab6ac64e2febec;p=youtube-dl diff --git a/youtube_dl/extractor/keek.py b/youtube_dl/extractor/keek.py index 280134a2a..7e1a3f67c 100644 --- a/youtube_dl/extractor/keek.py +++ b/youtube_dl/extractor/keek.py @@ -1,7 +1,6 @@ +# coding: utf-8 from __future__ import unicode_literals -import re - from .common import InfoExtractor @@ -14,7 +13,7 @@ class KeekIE(InfoExtractor): 'info_dict': { 'id': 'NODfbab', 'ext': 'mp4', - 'title': 'test chars: "\'/\\\xe4<>This is a test video for youtube-dl.For more information, contact phihag@phihag.de . - Video - Videos on Keek', + 'title': 'test chars: "\'/\\ä<>This is a test video for youtube-dl.For more information, contact phihag@phihag.de . - Video - Videos on Keek', 'description': 'md5:35d42050a3ece241d5ddd7fdcc6fd896', 'uploader': 'ytdl', 'uploader_id': 'eGT5bab', @@ -25,10 +24,6 @@ class KeekIE(InfoExtractor): video_id = self._match_id(url) webpage = self._download_webpage(url, video_id) - uploader = uploader_id = None - matches = re.search(r'data-username="(?P[^"]+)"[^>]*data-user-id="(?P[^"]+)"', webpage) - if matches: - uploader, uploader_id = matches.groups() return { 'id': video_id, @@ -37,6 +32,6 @@ class KeekIE(InfoExtractor): 'title': self._og_search_title(webpage), 'description': self._og_search_description(webpage), 'thumbnail': self._og_search_thumbnail(webpage), - 'uploader': uploader, - 'uploader_id': uploader_id, + 'uploader': self._search_regex(r'data-username="([^"]+)"', webpage, 'uploader', fatal=False), + 'uploader_id': self._search_regex(r'data-user-id="([^"]+)"', webpage, 'uploader id', fatal=False), }