From 0f839bafac6aca836014ead88e7bfbca91a6d043 Mon Sep 17 00:00:00 2001 From: MaxwellGoblin Date: Tue, 18 Jul 2017 09:16:01 +0800 Subject: [PATCH] [nicovideo]fix title --- src/you_get/extractors/nicovideo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/you_get/extractors/nicovideo.py b/src/you_get/extractors/nicovideo.py index 3df933da..da9129de 100644 --- a/src/you_get/extractors/nicovideo.py +++ b/src/you_get/extractors/nicovideo.py @@ -31,10 +31,11 @@ context=ssl.SSLContext(ssl.PROTOCOL_TLSv1)) nicovideo_login(user, password) html = get_html(url) # necessary! - title = unicodize(r1(r']*>([^<]+)', html)) + title = r1(r'(.+?)', html) + #title = unicodize(r1(r']*>([^<]+)', html)) vid = url.split('/')[-1].split('?')[0] - api_html = get_html('http://www.nicovideo.jp/api/getflv?v=%s' % vid) + api_html = get_html('http://flapi.nicovideo.jp/api/getflv?v=%s' % vid) real_url = parse.unquote(r1(r'url=([^&]+)&', api_html)) type, ext, size = url_info(real_url)