aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/extractor
diff options
context:
space:
mode:
authorsprhawk <465558+sprhawk@users.noreply.github.com>2018-01-01 18:33:14 +0800
committersprhawk <465558+sprhawk@users.noreply.github.com>2018-01-01 18:33:14 +0800
commit6648fd8ad6e581354f46c840465cff4c92d2c6f3 (patch)
treeb5f7e04ed241c5364d4e052298cc6d869a200b40 /youtube_dl/extractor
parent48058d82dc3b448a72fd5ac1e7fa5492cd11f640 (diff)
changed to use .get to get field from json object
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r--youtube_dl/extractor/weibo.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/extractor/weibo.py b/youtube_dl/extractor/weibo.py
index 34809bdb2..cbe0c3228 100644
--- a/youtube_dl/extractor/weibo.py
+++ b/youtube_dl/extractor/weibo.py
@@ -121,7 +121,7 @@ class WeiboMobileIE(InfoExtractor):
webpage = self._download_webpage(url, video_id, note="visit the page")
js_code = self._search_regex(r'var\s+\$render_data\s*=\s*\[({.*})\]\[0\] \|\| {};', webpage, 'js_code', flags=re.DOTALL)
weibo_info = self._parse_json(js_code, video_id, transform_source=js_to_json)
- page_info = weibo_info['status']['page_info']
+ page_info = weibo_info.get('status').get('page_info')
title = weibo_info.get('status').get('status_title')
uploader = weibo_info.get('status').get('user').get('screen_name')