diff options
author | Sergey M․ <dstftw@gmail.com> | 2015-04-25 22:42:15 +0600 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2015-04-25 22:42:15 +0600 |
commit | d2d8248f68c029472bb81eacf4aa15987729977f (patch) | |
tree | 8fbd6b458a8f8236bc0a1c579878235d45dcf4c7 | |
parent | f54bab4d6777535390d64502bd20bb5a81b5468a (diff) |
[instagram] Modernize
-rw-r--r-- | youtube_dl/extractor/instagram.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/youtube_dl/extractor/instagram.py b/youtube_dl/extractor/instagram.py index d219ceb55..65f6ca103 100644 --- a/youtube_dl/extractor/instagram.py +++ b/youtube_dl/extractor/instagram.py @@ -3,9 +3,7 @@ from __future__ import unicode_literals import re from .common import InfoExtractor -from ..utils import ( - int_or_none, -) +from ..utils import int_or_none class InstagramIE(InfoExtractor): @@ -23,8 +21,8 @@ class InstagramIE(InfoExtractor): } def _real_extract(self, url): - mobj = re.match(self._VALID_URL, url) - video_id = mobj.group('id') + video_id = self._match_id(url) + webpage = self._download_webpage(url, video_id) uploader_id = self._search_regex(r'"owner":{"username":"(.+?)"', webpage, 'uploader id', fatal=False) |