aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor/vk.py
diff options
context:
space:
mode:
authorWill Sewell <me@willsewell.name>2014-11-21 23:21:03 +0000
committerWill Sewell <me@willsewell.name>2014-11-21 23:22:44 +0000
commit021a0db8f787521757919fde5a2303205312abff (patch)
treead2a4368e860a7ab0cf2a19f00532219432bb756 /youtube_dl/extractor/vk.py
parente1e8b6897b2e2610c45eb53fe44e1e07c3c39e82 (diff)
[vk.com] Simplified the page_id acquisition by using the id matched in the URL earlier on.
Diffstat (limited to 'youtube_dl/extractor/vk.py')
-rw-r--r--youtube_dl/extractor/vk.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/youtube_dl/extractor/vk.py b/youtube_dl/extractor/vk.py
index e8d7cdeae..b4e261fad 100644
--- a/youtube_dl/extractor/vk.py
+++ b/youtube_dl/extractor/vk.py
@@ -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))