aboutsummaryrefslogtreecommitdiffstats
path: root/gallery_dl/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'gallery_dl/__init__.py')
-rw-r--r--gallery_dl/__init__.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/gallery_dl/__init__.py b/gallery_dl/__init__.py
index 1d4215e..4b39c15 100644
--- a/gallery_dl/__init__.py
+++ b/gallery_dl/__init__.py
@@ -105,6 +105,11 @@ def main():
output.ANSI = True
+ # filter environment
+ filterenv = config.get((), "filters-environment", True)
+ if not filterenv:
+ util.compile_expression = util.compile_expression_raw
+
# format string separator
separator = config.get((), "format-separator")
if separator:
@@ -145,6 +150,10 @@ def main():
log.debug("Configuration Files %s", config._files)
+ if args.print_traffic:
+ import requests
+ requests.packages.urllib3.connection.HTTPConnection.debuglevel = 1
+
# extractor modules
modules = config.get(("extractor",), "modules")
if modules is not None:
@@ -240,6 +249,9 @@ def main():
if config.get(("output",), "fallback", True):
jobtype.handle_url = \
staticmethod(jobtype.handle_url_fallback)
+ elif args.dump_json:
+ jobtype = job.DataJob
+ jobtype.resolve = args.dump_json - 1
else:
jobtype = args.jobtype or job.DownloadJob
@@ -299,6 +311,8 @@ def main():
else:
input_manager.success()
+ except exception.StopExtraction:
+ pass
except exception.TerminateExtraction:
pass
except exception.RestartExtraction: