gui_parser.py 1.0 KB

12345678910111213141516
  1. from argparse import ArgumentParser
  2. from ..cookies import browsers
  3. from .. import Provider
  4. def gui_parser():
  5. parser = ArgumentParser(description="Run the GUI")
  6. parser.add_argument("--host", type=str, default="0.0.0.0", help="hostname")
  7. parser.add_argument("--port", "-p", type=int, default=8080, help="port")
  8. parser.add_argument("--debug", "-d", "-debug", action="store_true", help="debug mode")
  9. parser.add_argument("--ignore-cookie-files", action="store_true", help="Don't read .har and cookie files.")
  10. parser.add_argument("--ignored-providers", nargs="+", choices=[provider.__name__ for provider in Provider.__providers__ if provider.working],
  11. default=[], help="List of providers to ignore when processing request. (incompatible with --reload and --workers)")
  12. parser.add_argument("--cookie-browsers", nargs="+", choices=[browser.__name__ for browser in browsers],
  13. default=[], help="List of browsers to access or retrieve cookies from.")
  14. return parser