aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/vk.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2014-01-21 17:32:03 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2014-01-21 17:32:03 +0100
commit94a23d2a1ed94af8bb80898194f03c38a5dcdb1d (patch)
tree70a14b57d05e008b80a89da64584d30b1c6f56bf /youtube_dl/extractor/vk.py
parent608bf69880a09b5a7b409b584d15a66afdbc5ce5 (diff)
[vk] Use unicode_literals
Diffstat (limited to 'youtube_dl/extractor/vk.py')
-rw-r--r--youtube_dl/extractor/vk.py19
1 files changed, 10 insertions, 9 deletions
diff --git a/youtube_dl/extractor/vk.py b/youtube_dl/extractor/vk.py
index 2719becbf..02729506c 100644
--- a/youtube_dl/extractor/vk.py
+++ b/youtube_dl/extractor/vk.py
@@ -1,4 +1,6 @@
# encoding: utf-8
+from __future__ import unicode_literals
+
import re
import json
@@ -10,17 +12,16 @@ from ..utils import (
class VKIE(InfoExtractor):
- IE_NAME = u'vk.com'
+ IE_NAME = 'vk.com'
_VALID_URL = r'https?://vk\.com/(?:videos.*?\?.*?z=)?video(?P<id>.*?)(?:\?|%2F|$)'
_TEST = {
- u'url': u'http://vk.com/videos-77521?z=video-77521_162222515%2Fclub77521',
- u'md5': u'0deae91935c54e00003c2a00646315f0',
- u'info_dict': {
- u'id': u'162222515',
- u'ext': u'flv',
- u'title': u'ProtivoGunz - Хуёвая песня',
- u'uploader': u'Noize MC',
+ 'url': 'http://vk.com/videos-77521?z=video-77521_162222515%2Fclub77521',
+ 'file': '162222515.flv',
+ 'md5': '0deae91935c54e00003c2a00646315f0',
+ 'info_dict': {
+ 'title': 'ProtivoGunz - Хуёвая песня',
+ 'uploader': 'Noize MC',
},
}
@@ -33,7 +34,7 @@ class VKIE(InfoExtractor):
if m_yt is not None:
self.to_screen(u'Youtube video detected')
return self.url_result(m_yt.group(1), 'Youtube')
- data_json = self._search_regex(r'var vars = ({.*?});', info_page, u'vars')
+ data_json = self._search_regex(r'var vars = ({.*?});', info_page, 'vars')
data = json.loads(data_json)
return {