mirror of
https://github.com/nikdoof/globaltalk-scraper.git
synced 2025-12-17 12:59:23 +00:00
Add quiet mode
This commit is contained in:
@@ -84,6 +84,7 @@ def main():
|
|||||||
help="Filename to write the resulting JSON to",
|
help="Filename to write the resulting JSON to",
|
||||||
)
|
)
|
||||||
parser.add_argument("--debug", action="store_true", help="Enable debug logging")
|
parser.add_argument("--debug", action="store_true", help="Enable debug logging")
|
||||||
|
parser.add_argument("--quiet", action="store_true")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--workers",
|
"--workers",
|
||||||
type=int,
|
type=int,
|
||||||
@@ -94,6 +95,8 @@ def main():
|
|||||||
|
|
||||||
if args.debug:
|
if args.debug:
|
||||||
level = logging.DEBUG
|
level = logging.DEBUG
|
||||||
|
elif args.quiet:
|
||||||
|
level = logging.ERROR
|
||||||
else:
|
else:
|
||||||
level = logging.INFO
|
level = logging.INFO
|
||||||
logging.basicConfig(level=level, stream=sys.stderr)
|
logging.basicConfig(level=level, stream=sys.stderr)
|
||||||
|
|||||||
Reference in New Issue
Block a user