Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
TPEngineer
网页截图工具
提交
31cc7b40
网
网页截图工具
项目概览
TPEngineer
/
网页截图工具
与 Fork 源项目一致
Fork自
inscode / Python
通知
1
Star
12
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
网
网页截图工具
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
31cc7b40
编写于
5月 05, 2023
作者:
6
62bfaa38f5bc8d75ce8dc685
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fri May 5 05:06:03 UTC 2023 inscode
上级
ed319383
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
4 addition
and
5 deletion
+4
-5
.gitignore
.gitignore
+0
-1
google-chrome-stable_current_amd64.deb
google-chrome-stable_current_amd64.deb
+0
-0
install.sh
install.sh
+2
-2
main.py
main.py
+2
-2
static/uploads/8eb10bfb5b934b88.png
static/uploads/8eb10bfb5b934b88.png
+0
-0
未找到文件。
.gitignore
浏览文件 @
31cc7b40
static/uploads/*.png
google*
\ No newline at end of file
google-chrome-stable_current_amd64.deb
0 → 100644
浏览文件 @
31cc7b40
文件已添加
install.sh
浏览文件 @
31cc7b40
wget
'https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb'
#
wget 'https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb'
dpkg
-i
google-chrome-stable_current_amd64.deb
apt
--fix-broken
install
-y
dpkg
-i
google-chrome-stable_current_amd64.deb
pip
install
-r
requirements.txt
-i
https://pypi.tuna.tsinghua.edu.cn/simple
pip
install
-r
requirements.txt
mkdir
-p
/usr/share/fonts/chinese/
#创建中文字体目录
cp
simsun.ttf /usr/share/fonts/chinese/
#将字体文件拷贝到/usr/share/fonts/chinese/中
...
...
main.py
浏览文件 @
31cc7b40
...
...
@@ -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
import
time
def
take_screenshot
(
url
):
# 创建 Chrome 浏览器对象
...
...
@@ -20,7 +20,7 @@ def take_screenshot(url):
driver
.
get
(
url
)
# time.sleep(5)
driver
.
implicitly_wait
(
10
)
driver
.
implicitly_wait
(
10
0
)
file_name
=
'static/uploads/screenshot.png'
driver
.
save_screenshot
(
file_name
)
driver
.
quit
()
...
...
static/uploads/8eb10bfb5b934b88.png
已删除
100644 → 0
浏览文件 @
ed319383
94.8 KB
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录