Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
Chatgpt Puppeteer
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Chatgpt Puppeteer
Commits
4d5eec59
Commit
4d5eec59
authored
Oct 06, 2023
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
0c57c404
Pipeline
#23682
failed with stages
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
10 deletions
+17
-10
build/index.js
build/index.js
+16
-9
build/index.js.map
build/index.js.map
+1
-1
No files found.
build/index.js
View file @
4d5eec59
...
...
@@ -854,7 +854,9 @@ async function getOpenAIAuth({
if
(
email
&&
password
)
{
await
waitForConditionOrAtCapacity
(
page
,
()
=>
page
.
waitForSelector
(
"
#__next .btn-primary
"
,
{
timeout
:
timeoutMs
})
()
=>
page
.
waitForSelector
(
"
#__next button:first-child
"
,
{
timeout
:
timeoutMs
})
);
await
delay
(
500
);
do
{
...
...
@@ -863,7 +865,7 @@ async function getOpenAIAuth({
waitUntil
:
"
networkidle2
"
,
timeout
:
timeoutMs
}),
page
.
click
(
"
#__next
.btn-primary
"
)
page
.
click
(
"
#__next
button:first-child
"
)
]);
await
delay
(
500
);
}
while
(
page
.
url
().
endsWith
(
"
/auth/login
"
));
...
...
@@ -882,7 +884,7 @@ async function getOpenAIAuth({
]);
await
page
.
waitForSelector
(
'
input[type="password"]
'
,
{
visible
:
true
});
await
page
.
type
(
'
input[type="password"]
'
,
password
);
await
delay
(
5
0
);
await
delay
(
20
0
);
submitP
=
()
=>
page
.
keyboard
.
press
(
"
Enter
"
);
}
else
if
(
isMicrosoftLogin
)
{
await
page
.
click
(
'
button[data-provider="windowslive"]
'
);
...
...
@@ -895,7 +897,7 @@ async function getOpenAIAuth({
await
delay
(
1500
);
await
page
.
waitForSelector
(
'
input[type="password"]
'
,
{
visible
:
true
});
await
page
.
type
(
'
input[type="password"]
'
,
password
);
await
delay
(
5
0
);
await
delay
(
20
0
);
submitP
=
()
=>
page
.
keyboard
.
press
(
"
Enter
"
);
await
Promise
.
all
([
page
.
waitForNavigation
(),
...
...
@@ -928,16 +930,21 @@ async function getOpenAIAuth({
}
await
delay
(
2
e3
);
const
frame
=
page
.
mainFrame
();
const
submit
=
await
page
.
waitForSelector
(
'
button[type="submit"]
'
,
{
const
submit
=
await
page
.
waitForSelector
(
'
button[type="submit"][data-action-button-primary="true"]
'
,
{
timeout
:
timeoutMs
});
await
frame
.
focus
(
'
button[type="submit"]
'
);
}
);
await
frame
.
focus
(
'
button[type="submit"][data-action-button-primary="true"]
'
);
await
submit
.
focus
();
await
submit
.
click
();
await
page
.
waitForSelector
(
"
#password
"
,
{
timeout
:
timeoutMs
});
await
page
.
type
(
"
#password
"
,
password
);
await
delay
(
200
);
submitP
=
()
=>
page
.
click
(
'
button[type="submit"]
'
);
submitP
=
()
=>
page
.
click
(
'
button[type="submit"]
[data-action-button-primary="true"]
'
);
}
await
Promise
.
all
([
waitForConditionOrAtCapacity
(
...
...
build/index.js.map
View file @
4d5eec59
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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