Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
京
京东搜索采集自动验证
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄梓誉
京东搜索采集自动验证
Commits
79b71df5
Commit
79b71df5
authored
Feb 21, 2024
by
huangiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
25a781de
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
京东搜索_自动版.py
京东搜索_自动版.py
+4
-4
No files found.
京东搜索_自动版.py
View file @
79b71df5
...
@@ -114,7 +114,7 @@ class SlideUtils:
...
@@ -114,7 +114,7 @@ class SlideUtils:
y
+=
random
.
randint
(
-
9
,
0
)
y
+=
random
.
randint
(
-
9
,
0
)
pyautogui
.
moveTo
(
x
+
int
(
offset
*
random
.
randint
(
17
,
21
)
/
20
),
y
,
duration
=
random
.
randint
(
20
,
31
)
/
100
)
pyautogui
.
moveTo
(
x
+
int
(
offset
*
random
.
randint
(
17
,
21
)
/
20
),
y
,
duration
=
random
.
randint
(
20
,
31
)
/
100
)
y
+=
random
.
randint
(
2
,
5
)
y
+=
random
.
randint
(
2
,
5
)
pyautogui
.
moveTo
(
xx
,
y
,
duration
=
0.
3
)
pyautogui
.
moveTo
(
xx
,
y
,
duration
=
0.
8
)
pyautogui
.
mouseUp
()
pyautogui
.
mouseUp
()
@
staticmethod
@
staticmethod
...
@@ -131,8 +131,8 @@ class SlideUtils:
...
@@ -131,8 +131,8 @@ class SlideUtils:
pyautogui
.
moveTo
(
x
+
int
(
offset
*
random
.
randint
(
15
,
23
)
/
20
),
y
,
duration
=
0.28
)
pyautogui
.
moveTo
(
x
+
int
(
offset
*
random
.
randint
(
15
,
23
)
/
20
),
y
,
duration
=
0.28
)
y
+=
random
.
randint
(
-
9
,
0
)
y
+=
random
.
randint
(
-
9
,
0
)
pyautogui
.
moveTo
(
x
+
int
(
offset
*
random
.
randint
(
17
,
21
)
/
20
),
y
,
duration
=
random
.
randint
(
20
,
31
)
/
100
)
pyautogui
.
moveTo
(
x
+
int
(
offset
*
random
.
randint
(
17
,
21
)
/
20
),
y
,
duration
=
random
.
randint
(
20
,
31
)
/
100
)
y
+=
random
.
randint
(
0
,
2
)
y
+=
random
.
randint
(
0
,
3
)
pyautogui
.
moveTo
(
xx
,
y
,
duration
=
0.5
)
pyautogui
.
moveTo
(
xx
,
y
,
duration
=
1.2
)
# print("睡眠2秒后松开")
# print("睡眠2秒后松开")
# time.sleep(0.3)
# time.sleep(0.3)
pyautogui
.
mouseUp
()
pyautogui
.
mouseUp
()
...
@@ -468,7 +468,7 @@ def get_cookie():
...
@@ -468,7 +468,7 @@ def get_cookie():
print
(
"元素的Y位置:"
,
y_position
)
print
(
"元素的Y位置:"
,
y_position
)
# 其中x为屏幕左上角至滑块中心的横向像素值,y为屏幕左上角至滑块中心纵向像素值, 可根据自己屏幕配置
# 其中x为屏幕左上角至滑块中心的横向像素值,y为屏幕左上角至滑块中心纵向像素值, 可根据自己屏幕配置
# time.sleep(0.5)
# time.sleep(0.5)
SlideUtils
.
slide_by_pyautogui
2
(
x_position
,
SlideUtils
.
slide_by_pyautogui
(
x_position
,
y_position
,
y_position
,
x
,
x
,
offset_increase
)
offset_increase
)
...
...
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