Browse Source

[9gag] Modernize

totalwebcasting
Sergey M․ 9 years ago
parent
commit
c659022b5c
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      youtube_dl/extractor/ninegag.py

+ 5
- 3
youtube_dl/extractor/ninegag.py View File

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


Loading…
Cancel
Save