Merge pull request #69 from th3r00t/development

Development
This commit is contained in:
th3r00t
2021-07-24 14:23:59 -04:00
committed by GitHub
3 changed files with 7 additions and 4 deletions

View File

@@ -20,7 +20,10 @@ class DuckDuckGo:
query = query.string
except AttributeError:
query = query
search_result = requests.get(self.url + query + _key)
try:
search_result = requests.get(self.url + query + _key)
except Error as e:
return False
try:
image_result = search_result.json()["Image"]
except ValueError:

View File

@@ -281,11 +281,11 @@ class Catalogue:
"""
Opens epub as zip file filters then stores as list any files matching cover_regx
"""
cover = book_zip.open(list(filter(self.cover_regx.search, book["files"]))[0])
try:
cover = book_zip.open(list(filter(self.cover_regx.search, book["files"]))[0])
cover = book_zip.read(cover.name)
return cover
except KeyError:
except Exception as e:
return False
def compare_shelf_current(self):

View File

@@ -58,7 +58,7 @@ class Server:
async def initialize_server(self):
self.config.logger.info("INITIALIZE")
self.serve = await websockets.serve(self.socketio, self.host[0], self.host[1])
await asyncio.sleep(.01)
await asyncio.sleep(.1)
self.config.logger.info("Server Initialization Complete")
async def runImport(self):