Added optional requirements for metadata amazon

Better logging of errors in metadata source files
This commit is contained in:
Ozzie Isaacs 2022-01-29 21:02:56 +01:00
parent 39ac37861f
commit bb7f4cf74e
4 changed files with 13 additions and 6 deletions

View File

@ -19,7 +19,7 @@
import concurrent.futures
import requests
from bs4 import BeautifulSoup as BS # requirement
# import lxml #requirement for better speed
try:
import cchardet #optional for better speed
except ImportError:

View File

@ -49,8 +49,8 @@ for f in modules:
try:
importlib.import_module("cps.metadata_provider." + a)
new_list.append(a)
except ImportError:
log.error("Import error for metadata source: {}".format(a))
except ImportError as e:
log.error("Import error for metadata source: {} - {}".format(a, e))
pass

View File

@ -31,9 +31,11 @@ SQLAlchemy-Utils>=0.33.5,<0.39.0
# metadata extraction
rarfile>=2.7
scholarly>=1.2.0,<1.6
markdown2==2.4.2
html2text==2020.1.16
python-dateutil==2.8.2
markdown2>=2.0.0,<2.5.0
html2text>=2020.1.16,<2022.1.1
python-dateutil>=2.1,<2.9.0
beautifulsoup4>=4.0.1,<4.2.0
cchardet>=2.0.0,<2.2.0
# Comics
natsort>=2.2.0,<8.1.0

View File

@ -86,6 +86,11 @@ oauth =
metadata =
rarfile>=2.7
scholarly>=1.2.0,<1.6
markdown2>=2.0.0,<2.5.0
html2text>=2020.1.16,<2022.1.1
python-dateutil>=2.1,<2.9.0
beautifulsoup4>=4.0.1,<4.2.0
cchardet>=2.0.0,<2.2.0
comics =
natsort>=2.2.0,<8.1.0
comicapi>=2.2.0,<2.3.0