diff --git a/README.org b/README.org index 667b05c..6bfb073 100644 --- a/README.org +++ b/README.org @@ -21,12 +21,18 @@ python orchestrator.py [options] Make sure to have =docker= installed. For python best practices, create a virtual environment and install dependencies: -#+begin_src bash +#+begin_src sh python -m venv venv source venv/bin/activate pip install -r requirements.txt #+end_src +Also build the container + +#+begin_src sh +docker build -t search-api . +#+end_src + *** Arguments - =website= (required): The website URL you want to scrape diff --git a/orchestrator.py b/orchestrator.py index b93a0f3..e4b3c48 100644 --- a/orchestrator.py +++ b/orchestrator.py @@ -40,8 +40,8 @@ env_vars = { output_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'output') -# os.makedirs(output_dir, exist_ok=True) -# os.chmod(output_dir, 0o777) +os.makedirs(output_dir, exist_ok=True) +os.chmod(output_dir, 0o777) if args.browser_args: env_vars['BROWSER_ARGS'] = ','.join(args.browser_args) @@ -51,7 +51,6 @@ if args.proxy_url: try: container_start_time = time.time() - print("Container start time:", container_start_time) container = docker_client.containers.run( args.image_name, @@ -143,7 +142,6 @@ try: subprocess.run(['open', 'output/report.html']) print("Report opened in browser") except (subprocess.CalledProcessError, FileNotFoundError): - print("what happened") pass