+
+ uploader = self._og_search_property(
+ 'nick-name', webpage, 'uploader', default=None)
+
+ return {
+ 'id': video_id,
+ 'title': title,
+ 'uploader': uploader,
+ 'formats': formats
+ }
+
+
+class WeiboMobileIE(InfoExtractor):
+ _VALID_URL = r'https?://m\.weibo\.cn/status/(?P<id>[0-9]+)(\?.+)?'
+ _TEST = {
+ 'url': 'https://m.weibo.cn/status/4189191225395228?wm=3333_2001&sourcetype=weixin&featurecode=newtitle&from=singlemessage&isappinstalled=0',
+ 'info_dict': {
+ 'id': '4189191225395228',
+ 'ext': 'mp4',
+ 'title': '午睡当然是要甜甜蜜蜜的啦',
+ 'uploader': '柴犬柴犬'
+ }
+ }
+
+ def _real_extract(self, url):
+ video_id = self._match_id(url)
+ # to get Referer url for genvisitor
+ webpage = self._download_webpage(url, video_id, note='visit the page')
+
+ weibo_info = self._parse_json(self._search_regex(
+ r'var\s+\$render_data\s*=\s*\[({.*})\]\[0\]\s*\|\|\s*{};',
+ webpage, 'js_code', flags=re.DOTALL),
+ video_id, transform_source=js_to_json)
+
+ status_data = weibo_info.get('status', {})
+ page_info = status_data.get('page_info')
+ title = status_data['status_title']
+ uploader = status_data.get('user', {}).get('screen_name')
+