mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Merge branch 'master' of github.com:th3r00t/pyShelf
This commit is contained in:
@@ -21,7 +21,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:
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user