/
default.py
46 lines (42 loc) · 1.14 KB
/
default.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
from recipe_scrapers.plugins import (
ExceptionHandlingPlugin,
HTMLTagStripperPlugin,
NormalizeStringPlugin,
OpenGraphImageFetchPlugin,
SchemaOrgFillPlugin,
)
# Plugins to be attached.
# The upper most plugin is the "outer most" executed.
# Check recipe_scrapers.settings.template.py for ways to extend.
PLUGINS = (
ExceptionHandlingPlugin,
HTMLTagStripperPlugin,
NormalizeStringPlugin,
OpenGraphImageFetchPlugin,
SchemaOrgFillPlugin,
)
SUPPRESS_EXCEPTIONS = False
# Applicable only if SUPPRESS_EXCEPTIONS is True, otherwise ignored
# silence <anyScraper>.[method]() exception and return the value
# as listed in the config here.
ON_EXCEPTION_RETURN_VALUES = {
"title": None,
"total_time": None,
"yields": None,
"image": None,
"ingredients": None,
"instructions": None,
"instructions_list": None,
"ratings": None,
"reviews": None,
"links": None,
"language": None,
"nutrients": None,
}
# logging.DEBUG # 10
# logging.INFO # 20
# logging.WARNING # 30
# logging.ERROR # 40
# logging.CRITICAL # 50
# https://docs.python.org/3/howto/logging.html
LOG_LEVEL = 30