aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2015-06-15 20:46:10 +0600
committerSergey M․ <dstftw@gmail.com>2015-06-15 20:46:10 +0600
commit054932f4035d606946f0c054c02cf87496b753f6 (patch)
tree1cca1efd9d5d2f0fc7e9ef4ecc0275e49c07ff35 /youtube_dl/extractor
parent4af98ecdfb896c16e73cb9f7306908cc686782e8 (diff)
[vk] Fix extraction (Closes #5987)
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/vk.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/youtube_dl/extractor/vk.py b/youtube_dl/extractor/vk.py
index d0e772108..6aeba109d 100644
--- a/youtube_dl/extractor/vk.py
+++ b/youtube_dl/extractor/vk.py
@@ -175,16 +175,16 @@ class VKIE(InfoExtractor):
m_rutube.group(1).replace('\\', ''))
return self.url_result(rutube_url)
- m_opts = re.search(r'(?s)var\s+opts\s*=\s*({.*?});', info_page)
+ m_opts = re.search(r'(?s)var\s+opts\s*=\s*({.+?});', info_page)
if m_opts:
- m_opts_url = re.search(r"url\s*:\s*'([^']+)", m_opts.group(1))
+ m_opts_url = re.search(r"url\s*:\s*'((?!/\b)[^']+)", m_opts.group(1))
if m_opts_url:
opts_url = m_opts_url.group(1)
if opts_url.startswith('//'):
opts_url = 'http:' + opts_url
return self.url_result(opts_url)
- data_json = self._search_regex(r'var vars = ({.*?});', info_page, 'vars')
+ data_json = self._search_regex(r'var\s+vars\s*=\s*({.+?});', info_page, 'vars')
data = json.loads(data_json)
# Extract upload date