Merge branch 'develop' of https://github.com/soimort/you-get into pandatv-fix-#1612

This commit is contained in:
Valdemar Erk 2017-01-10 22:23:36 +01:00
commit 503421da1d
4 changed files with 6 additions and 2 deletions

View File

@ -127,10 +127,11 @@ def bilibili_download(url, output_dir='.', merge=True, info_only=False, **kwargs
if re.match(r'https?://bangumi\.bilibili\.com/', url): if re.match(r'https?://bangumi\.bilibili\.com/', url):
# quick hack for bangumi URLs # quick hack for bangumi URLs
episode_id = r1(r'first_ep_id = "(\d+)"', html) episode_id = r1(r'#(\d+)$', url) or r1(r'first_ep_id = "(\d+)"', html)
cont = post_content('http://bangumi.bilibili.com/web_api/get_source', cont = post_content('http://bangumi.bilibili.com/web_api/get_source',
post_data={'episode_id': episode_id}) post_data={'episode_id': episode_id})
cid = json.loads(cont)['result']['cid'] cid = json.loads(cont)['result']['cid']
title = '%s [%s]' % (title, episode_id)
bilibili_download_by_cid(str(cid), title, output_dir=output_dir, merge=merge, info_only=info_only) bilibili_download_by_cid(str(cid), title, output_dir=output_dir, merge=merge, info_only=info_only)
else: else:

View File

@ -17,6 +17,8 @@ def nanagogo_download(url, output_dir='.', merge=True, info_only=False, **kwargs
info = json.loads(get_content(api_url)) info = json.loads(get_content(api_url))
items = [] items = []
if info['data']['posts']['post'] is None:
return
for i in info['data']['posts']['post']['body']: for i in info['data']['posts']['post']['body']:
if 'image' in i: if 'image' in i:
image_url = i['image'] image_url = i['image']

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python #!/usr/bin/env python
script_name = 'you-get' script_name = 'you-get'
__version__ = '0.4.595' __version__ = '0.4.626'

View File

@ -24,6 +24,7 @@
"Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Topic :: Internet", "Topic :: Internet",
"Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP",
"Topic :: Multimedia", "Topic :: Multimedia",