Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ilude committed Mar 25, 2024
1 parent 012fad7 commit 5ced6a4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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
3 changes: 1 addition & 2 deletions app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@
app = Flask(__name__)

try:
os.makedirs('app/static/screenshots')
# Create a headless browser instance
options = webdriver.ChromeOptions()
options.add_argument('--no-sandbox')
options.add_argument('--headless')
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)}")
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ flask
requests
selenium
pillow
hypercorn
hypercorn==0.15.0

0 comments on commit 5ced6a4

Please sign in to comment.