Snapshot: full project state
This commit is contained in:
19
fill_worker.py
Normal file
19
fill_worker.py
Normal file
@@ -0,0 +1,19 @@
|
||||
#!/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)))
|
||||
Reference in New Issue
Block a user