Fail even if error is none
This commit is contained in:
parent
ba7f2b6f99
commit
7cda647899
|
@ -25,7 +25,7 @@ async def nhentai_comment_info(client, message):
|
|||
async with session.get(f'https://nhentai.net/api/gallery/{sauce}') as resp:
|
||||
info = await resp.json()
|
||||
text = f'<b>{sauce}</b>\n<b>'
|
||||
if info.get('error'):
|
||||
if 'error' in info:
|
||||
text += f'Error:</b> {html.escape(info.get("error"))}'
|
||||
else:
|
||||
text += 'Title:</b> '
|
||||
|
|
Loading…
Reference in New Issue