diff --git a/Makefile b/Makefile index 104610a..5073291 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,7 @@ .PHONY: run -SITE_PACKAGES := $(shell pip show pip | grep '^Location' | cut -f2 -d':') +SITE_PACKAGES := $(shell pip show pip | grep '^Location' | cut -d' ' -f2-) run: $(SITE_PACKAGES) python3 app/app.py $(SITE_PACKAGES): requirements.txt pip install -r requirements.txt - touch requirements.txt \ No newline at end of file diff --git a/app/app.py b/app/app.py index 9c62ab3..f8f156f 100644 --- a/app/app.py +++ b/app/app.py @@ -7,7 +7,6 @@ app = Flask(__name__) try: - os.makedirs('app/static/screenshots') # Create a headless browser instance options = webdriver.ChromeOptions() options.add_argument('--no-sandbox') @@ -15,7 +14,7 @@ options.add_argument('--disable-gpu') options.add_argument('--disable-dev-shm-usage') options.add_argument('--profile-directory=Default') - options.add_argument('--user-data-dir=~/.config/google-chrome') + options.add_argument('--user-data-dir=/tmp') driver = webdriver.Chrome(options=options) except Exception as e: print(f"Error creating headless browser: {str(e)}") diff --git a/requirements.txt b/requirements.txt index e9662d7..93027af 100755 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,4 @@ flask requests selenium pillow -hypercorn \ No newline at end of file +hypercorn==0.15.0 \ No newline at end of file