diff --git a/main.py b/main.py index 8ce479539edb3ebd076e802edc940449e2eea82d..898237f6a602cb2acec587b80a20198f0a841345 100644 --- a/main.py +++ b/main.py @@ -4,7 +4,7 @@ from flask import Flask, render_template, request, send_file, jsonify # import os app = Flask(__name__) app.config['UPLOAD_FOLDER'] = 'static/uploads/' -import time +exec('import time') def take_screenshot(url): # 创建 Chrome 浏览器对象 @@ -19,7 +19,7 @@ def take_screenshot(url): driver.maximize_window() driver.get(url) - # time.sleep(5) + time.sleep(5) driver.implicitly_wait(100) file_name = 'static/uploads/screenshot.png' driver.save_screenshot(file_name) diff --git a/test.sh b/test.sh new file mode 100644 index 0000000000000000000000000000000000000000..ee13dc7c39ce2ad97acaa1996c6903b1cfab62cf --- /dev/null +++ b/test.sh @@ -0,0 +1,3 @@ +for i in `find /root/$PROJECT_DIR/ -type f -name "*.py" | xargs grep -E "^from|^import"| awk '{print $2}'`; do + printf "%s\n" $i +done \ No newline at end of file