mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 15:09:54 -05:00
fix
This commit is contained in:
parent
dee307199b
commit
0f6c881ecd
@ -178,6 +178,7 @@ class BotGif():
|
||||
page = e
|
||||
page = None
|
||||
if page and not str(page.status_code).startswith(tuple(["4", "5"])):
|
||||
try:
|
||||
data = json.loads(urllib.request.urlopen(url).read().decode('utf-8'))
|
||||
results = data[self.valid_api[currentapi]['results']]
|
||||
resultsarray = []
|
||||
@ -207,6 +208,8 @@ class BotGif():
|
||||
"gifapi": currentapi,
|
||||
}
|
||||
self.valid_api[currentapi]["cache"][str(searchquery).lower()].append(tempdict)
|
||||
except urllib.error.HTTPError:
|
||||
return
|
||||
|
||||
def gif_url_assemble(self, currentapi, searchquery, searchlimit, searchnsfw):
|
||||
# url base
|
||||
|
||||
Loading…
Reference in New Issue
Block a user