mirror of
				https://github.com/yt-dlp/yt-dlp.git
				synced 2025-10-31 14:45:14 +00:00 
			
		
		
		
	[vk] Use unicode_literals
This commit is contained in:
		| @@ -1,4 +1,6 @@ | |||||||
| # encoding: utf-8 | # encoding: utf-8 | ||||||
|  | from __future__ import unicode_literals | ||||||
|  |  | ||||||
| import re | import re | ||||||
| import json | import json | ||||||
|  |  | ||||||
| @@ -10,17 +12,16 @@ from ..utils import ( | |||||||
|  |  | ||||||
|  |  | ||||||
| class VKIE(InfoExtractor): | class VKIE(InfoExtractor): | ||||||
|     IE_NAME = u'vk.com' |     IE_NAME = 'vk.com' | ||||||
|     _VALID_URL = r'https?://vk\.com/(?:videos.*?\?.*?z=)?video(?P<id>.*?)(?:\?|%2F|$)' |     _VALID_URL = r'https?://vk\.com/(?:videos.*?\?.*?z=)?video(?P<id>.*?)(?:\?|%2F|$)' | ||||||
|  |  | ||||||
|     _TEST = { |     _TEST = { | ||||||
|         u'url': u'http://vk.com/videos-77521?z=video-77521_162222515%2Fclub77521', |         'url': 'http://vk.com/videos-77521?z=video-77521_162222515%2Fclub77521', | ||||||
|         u'md5': u'0deae91935c54e00003c2a00646315f0', |         'file': '162222515.flv', | ||||||
|         u'info_dict': { |         'md5': '0deae91935c54e00003c2a00646315f0', | ||||||
|             u'id': u'162222515', |         'info_dict': { | ||||||
|             u'ext': u'flv', |             'title': 'ProtivoGunz - Хуёвая песня', | ||||||
|             u'title': u'ProtivoGunz - Хуёвая песня', |             'uploader': 'Noize MC', | ||||||
|             u'uploader': u'Noize MC', |  | ||||||
|         }, |         }, | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -33,7 +34,7 @@ class VKIE(InfoExtractor): | |||||||
|         if m_yt is not None: |         if m_yt is not None: | ||||||
|             self.to_screen(u'Youtube video detected') |             self.to_screen(u'Youtube video detected') | ||||||
|             return self.url_result(m_yt.group(1), 'Youtube') |             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) |         data = json.loads(data_json) | ||||||
|  |  | ||||||
|         return { |         return { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Philipp Hagemeister
					Philipp Hagemeister