mirror of
https://github.com/soimort/you-get.git
synced 2025-01-23 21:45:02 +03:00
Nicovideo: fix URLs with parameters
This commit is contained in:
parent
c51f7b8aa0
commit
b4614390f1
@ -30,7 +30,8 @@ context=ssl.SSLContext(ssl.PROTOCOL_TLSv1))
|
||||
html = get_html(url) # necessary!
|
||||
title = unicodize(r1(r'<span class="videoHeaderTitle">([^<]+)</span>', html))
|
||||
|
||||
api_html = get_html('http://www.nicovideo.jp/api/getflv?v=%s' % url.split('/')[-1])
|
||||
vid = url.split('/')[-1].split('?')[0]
|
||||
api_html = get_html('http://www.nicovideo.jp/api/getflv?v=%s' % vid)
|
||||
real_url = parse.unquote(r1(r'url=([^&]+)&', api_html))
|
||||
|
||||
type, ext, size = url_info(real_url)
|
||||
|
Loading…
Reference in New Issue
Block a user