]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[vk] Support optional dash for oid in embedded links
authorSergey M․ <dstftw@gmail.com>
Tue, 1 Apr 2014 12:37:57 +0000 (19:37 +0700)
committerSergey M․ <dstftw@gmail.com>
Tue, 1 Apr 2014 12:38:42 +0000 (19:38 +0700)
youtube_dl/extractor/vk.py

index 3b3bec92fedd06fe4f61cea73d3e1e97c425e290..8b1432fec7f26d0482eb516347233277e982543b 100644 (file)
@@ -16,7 +16,7 @@ from ..utils import (
 
 class VKIE(InfoExtractor):
     IE_NAME = 'vk.com'
-    _VALID_URL = r'https?://vk\.com/(?:video_ext\.php\?.*?\boid=(?P<oid>\d+).*?\bid=(?P<id>\d+)|(?:videos.*?\?.*?z=)?video(?P<videoid>.*?)(?:\?|%2F|$))'
+    _VALID_URL = r'https?://vk\.com/(?:video_ext\.php\?.*?\boid=(?P<oid>-?\d+).*?\bid=(?P<id>\d+)|(?:videos.*?\?.*?z=)?video(?P<videoid>.*?)(?:\?|%2F|$))'
     _NETRC_MACHINE = 'vk'
 
     _TESTS = [