1
0
Fork 0
mirror of https://github.com/myned/modufur.git synced 2024-11-01 13:02:38 +00:00

Fix reverse search url regression

This commit is contained in:
Myned 2020-03-15 21:28:42 -04:00
parent 940a1462d3
commit dd76d0068d
No known key found for this signature in database
GPG key ID: 2EF9C0C44229D034

View file

@ -85,7 +85,7 @@ asession = aiohttp.ClientSession()
async def fetch(url, *, json=False, response=False, text=False): async def fetch(url, *, json=False, response=False, text=False):
if 'e621' in url or 'e926' in url: if '.json' in url and ('e621' in url or 'e926' in url):
url += f'&login=BotMyned&api_key={config["e621_api"]}' url += f'&login=BotMyned&api_key={config["e621_api"]}'
async with asession.get(url, headers={ async with asession.get(url, headers={
'User-Agent': 'Myned/Modufur (https://github.com/Myned/Modufur)'}, ssl=False) as r: 'User-Agent': 'Myned/Modufur (https://github.com/Myned/Modufur)'}, ssl=False) as r: