Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wxScanck
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
yaozheng
wxScanck
Commits
ce451d60
Commit
ce451d60
authored
Feb 28, 2022
by
TesterYao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a1a4883e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
starter.py
starter.py
+12
-10
No files found.
starter.py
View file @
ce451d60
...
...
@@ -10,6 +10,8 @@ def check_ex():
LOG
.
info
(
'不在微信首页,重新打开微信'
)
device
.
stop_app
(
'com.tencent.xin'
)
device
.
start_app
(
'com.tencent.xin'
)
if
poco
(
"扫一扫"
)
.
exists
():
poco
(
"快捷操作"
)
.
click
()
def
check_wx
():
...
...
@@ -25,22 +27,22 @@ def check_wx():
def
scan
(
photo
):
block_list
=
[]
LOG
.
info
(
'打开扫一扫,选择二维码'
)
poco
(
"快捷操作"
)
.
click
()
poco
(
"扫一扫"
)
.
click
()
poco
(
"快捷操作"
)
.
wait
(
timeout
=
5
)
.
click
()
poco
(
"扫一扫"
)
.
wait
(
timeout
=
5
)
.
click
()
wait
(
Template
(
r"tpl1644909001064.png"
,
record_pos
=
(
0.396
,
0.696
),
resolution
=
(
828
,
1792
)),
timeout
=
5
)
touch
(
Template
(
r"tpl1644909001064.png"
,
record_pos
=
(
0.396
,
0.696
),
resolution
=
(
828
,
1792
)))
poco
(
photo
)
.
click
()
poco
(
name
=
"完成"
)
.
click
()
LOG
.
info
(
'扫码完成,开始进行巡查'
)
poco
(
photo
)
.
wait
(
timeout
=
5
)
.
click
()
poco
(
name
=
"完成"
)
.
wait
(
timeout
=
5
)
.
click
()
poco
(
type
=
"Link"
)
.
wait
(
timeout
=
5
)
links
=
poco
(
type
=
"Link"
)
for
link
in
links
:
link
.
click
()
LOG
.
info
(
'开始巡查:'
+
link
.
get_name
())
sleep
(
1
)
sleep
(
1.5
)
if
poco
(
name
=
"已停止访问该网页"
)
.
exists
():
block_list
.
append
(
link
.
get_name
())
poco
(
name
=
"返回"
)
.
click
()
poco
(
name
=
"返回"
)
.
wait
(
timeout
=
5
)
.
click
()
LOG
.
info
(
'巡查结束,关闭扫码webview!'
)
poco
(
name
=
"关闭"
)
.
click
()
poco
(
name
=
"关闭"
)
.
wait
(
timeout
=
5
)
.
click
()
return
block_list
...
...
@@ -78,4 +80,4 @@ if __name__ == '__main__':
except
Exception
as
e
:
print
(
e
)
LOG
.
error
(
'域名巡查脚本报错,三分钟后重试!'
)
sleep
(
180
)
\ No newline at end of file
sleep
(
30
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment