Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python_open_ai
Overview
Overview
Details
Activity
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haojie
python_open_ai
Commits
6c5dfa09
Commit
6c5dfa09
authored
Apr 10, 2023
by
lei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
d5a6e71a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
ai_pyppeteer.py
+2
-9
No files found.
ai_pyppeteer.py
View file @
6c5dfa09
import
requests
as
req
import
pyperclip
import
time
from
loguru
import
logger
import
asyncio
...
...
@@ -47,10 +46,6 @@ class ToWork:
"""
return
random
.
randint
(
min_num
,
max_num
)
# 粘贴板插入数据
def
driver_copy
(
self
,
driver
,
value
):
pyperclip
.
copy
(
value
)
# 粘贴--键盘输入
async
def
driver_paste
(
self
,
page
,
value
):
for
i
in
value
:
...
...
@@ -452,10 +447,8 @@ class ToWork:
def
process_start
(
browser_item
,
lock
):
try
:
logger
.
info
(
'开始执行任务'
)
loop
=
asyncio
.
get_event_loop
()
keyword
=
ToWork
(
browser_item
,
lock
)
logger
.
info
(
'开始执行任务2'
)
# 生产
loop
.
run_until_complete
(
keyword
.
on_start
())
# 测试
...
...
@@ -473,8 +466,8 @@ if __name__ == '__main__':
logger
.
info
(
'__main__'
)
browser_list
=
[
{
'num'
:
2
,
'id'
:
'
F1670ACB-79E6-4071-A7EA-69ECDA448ED8
'
'num'
:
1
,
'id'
:
'
A1263FA0-7BBD-42F8-B048-75678D59654D
'
}
]
lock
=
Lock
()
...
...
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