fix
This commit is contained in:
parent
b2d386b005
commit
e8168f4ed4
3
init.sh
Normal file → Executable file
3
init.sh
Normal file → Executable file
@ -1,3 +1,6 @@
|
||||
pip install -r requirements.txt
|
||||
|
||||
playwright install-deps
|
||||
# apt-get install libatk1.0-0 libatk-bridge2.0-0 libcups2 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libxkbcommon0 libpango-1.0-0 libcairo2 libatspi2.0-0
|
||||
|
||||
playwright install chromium
|
@ -3,7 +3,9 @@ import time
|
||||
from flask import Flask, request
|
||||
from gevent import monkey
|
||||
from playwright.sync_api import sync_playwright
|
||||
|
||||
from dotenv import load_dotenv
|
||||
# 加载环境变量
|
||||
load_dotenv()
|
||||
monkey.patch_all()
|
||||
|
||||
app = Flask(__name__)
|
||||
@ -62,4 +64,5 @@ def get_a1():
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(host="0.0.0.0", port=5005)
|
||||
port = os.getenv('XHS_API_PORT', 5005)
|
||||
app.run(host="0.0.0.0", port=port)
|
Loading…
x
Reference in New Issue
Block a user