20 lines
642 B
Python
20 lines
642 B
Python
#!/usr/bin/env python3
|
|
"""Worker entry point launched by the Castor dashboard to run the visible
|
|
autofill browser as a subprocess. Import the engine from app.py."""
|
|
import argparse
|
|
import json
|
|
import sys
|
|
|
|
from app import launch_fill
|
|
|
|
if __name__ == "__main__":
|
|
ap = argparse.ArgumentParser()
|
|
ap.add_argument("--urls", required=True, help="JSON array of signup URLs")
|
|
ap.add_argument("--headless", action="store_true")
|
|
args = ap.parse_args()
|
|
|
|
urls = json.loads(args.urls)
|
|
summary = launch_fill(urls, headless=args.headless)
|
|
for url, results in summary:
|
|
print("%s -> filled %d fields" % (url, len(results)))
|