[vk.com] Simplified the page_id acquisition by using the id matched in the URL earlie...
authorWill Sewell <me@willsewell.name>
Fri, 21 Nov 2014 23:21:03 +0000 (23:21 +0000)
committerWill Sewell <me@willsewell.name>
Fri, 21 Nov 2014 23:22:44 +0000 (23:22 +0000)
youtube_dl/extractor/vk.py

index e8d7cdeaea7d48ad9ce79600d6ed634f0e6fc158..b4e261fad3c14bb2672e33b728984679301ad0d9 100644 (file)
@@ -218,13 +218,7 @@ class VKUserVideosIE(InfoExtractor):
     }
 
     def _real_extract(self, url):
-        # Extract page id
-        mobj = re.match(self._VALID_URL, url)
-        if mobj is None:
-            raise ExtractorError('Invalid URL: %s' % url)
-
-        # Download page and get video ids
-        page_id = mobj.group(1)
+        page_id = self._match_id(url)
         page = self._download_webpage(url, page_id)
         video_ids = orderedSet(m.group(1) for m in re.finditer(r'href="/video([0-9_]+)"', page))