aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorremitamine <remitamine@gmail.com>2015-09-27 19:09:48 +0100
committerSergey M․ <dstftw@gmail.com>2015-09-28 01:03:22 +0600
commit98e1c935a1ed676ca747c04c28d98370f740cadc (patch)
tree795788ee3e40313b753fd66cbf7b14e18a75daf3 /youtube_dl/extractor
parentf30e9976d62c528bc7eda7b90d7c2fbc89d0b0be (diff)
[keek] extract uploader and uploader id with _search_regex
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/keek.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/youtube_dl/extractor/keek.py b/youtube_dl/extractor/keek.py
index d84774dca..99154112b 100644
--- a/youtube_dl/extractor/keek.py
+++ b/youtube_dl/extractor/keek.py
@@ -1,8 +1,6 @@
# coding: utf-8
from __future__ import unicode_literals
-import re
-
from .common import InfoExtractor
@@ -26,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<uploader>[^"]+)"[^>]*data-user-id="(?P<uploader_id>[^"]+)"', webpage)
- if matches:
- uploader, uploader_id = matches.groups()
return {
'id': video_id,
@@ -38,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', None),
+ 'uploader_id': self._search_regex(r'data-user-id="([^"]+)"', webpage, 'uploader id', None),
}