Skip to content

Commit

Permalink
Added optional requirements for metadata amazon
Browse files Browse the repository at this point in the history
Better logging of errors in metadata source files
  • Loading branch information
OzzieIsaacs committed Jan 29, 2022
1 parent 39ac378 commit bb7f4cf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cps/metadata_provider/amazon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions cps/search_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
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


Expand Down
8 changes: 5 additions & 3 deletions optional-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bb7f4cf

Please sign in to comment.