提交 655e26ac 编写于 作者: M Mort Yao

YouTube: fix regex

上级 40c0aef7
......@@ -138,7 +138,7 @@ class YouTube(VideoExtractor):
elif video_info['status'] == ['fail']:
if video_info['errorcode'] == ['150']:
video_page = get_content('http://www.youtube.com/watch?v=%s' % self.vid)
ytplayer_config = json.loads(re.search('ytplayer.config\s*=\s*([^\n]+});', video_page).group(1))
ytplayer_config = json.loads(re.search('ytplayer.config\s*=\s*([^\n]+});ytplayer', video_page).group(1))
if 'title' in ytplayer_config['args']:
# 150 Restricted from playback on certain sites
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册