1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-29 19:47:54 +01:00

[9gag] Modernize

This commit is contained in:
Sergey M․ 2015-09-23 01:48:13 +06:00
parent 8ca2e93e1a
commit c659022b5c

View File

@ -58,9 +58,11 @@ class NineGagIE(InfoExtractor):
webpage = self._download_webpage(url, display_id) webpage = self._download_webpage(url, display_id)
post_view = json.loads(self._html_search_regex( post_view = self._parse_json(
r'var\s+postView\s*=\s*new\s+app\.PostView\({\s*post:\s*({.+?})\s*,\s*posts:\s*prefetchedCurrentPost', self._search_regex(
webpage, 'post view')) r'var\s+postView\s*=\s*new\s+app\.PostView\({\s*post:\s*({.+?})\s*,\s*posts:\s*prefetchedCurrentPost',
webpage, 'post view'),
display_id)
ie_key = None ie_key = None
source_url = post_view.get('sourceUrl') source_url = post_view.get('sourceUrl')