Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
EduSpider
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
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
viitto
EduSpider
Commits
e9a8ac49
Commit
e9a8ac49
authored
Oct 19, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
9c911c37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
ClassInAccountManager.cs
EduSpider/Spiders/ClassInRule/ClassInAccountManager.cs
+9
-7
No files found.
EduSpider/Spiders/ClassInRule/ClassInAccountManager.cs
View file @
e9a8ac49
...
...
@@ -259,21 +259,23 @@ namespace TicketSpider.Spiders.ClassInRule
{
//等待滑块加载
Thread
.
Sleep
(
5000
);
var
dirpath
=
$"
{
Environment
.
CurrentDirectory
}
\\geetest"
;
if
(!
Directory
.
Exists
(
dirpath
))
{
Directory
.
CreateDirectory
(
dirpath
);
}
driver
.
SwitchTo
().
Frame
(
driver
.
FindElement
(
By
.
Id
(
"tcaptcha_iframe"
)));
((
IJavaScriptExecutor
)
driver
).
ExecuteScript
(
"document.getElementById(\"slideBlock\").style.display = 'none';"
);
var
bgPng
=
((
ITakesScreenshot
)
driver
.
FindElement
(
By
.
Id
(
"slideBg"
))).
GetScreenshot
();
var
fileBgPath
=
$"
{
dirpath
}
\\
{
DateTime
.
Now
.
Ticks
}
.png"
;
bgPng
.
SaveAsFile
(
fileBgPath
,
ScreenshotImageFormat
.
Png
);
((
IJavaScriptExecutor
)
driver
).
ExecuteScript
(
"document.getElementById(\"slideBlock\").style.display = 'block';document.getElementById(\"slideBg\").style.opacity = 0;"
);
var
blockPng
=
((
ITakesScreenshot
)
driver
.
FindElement
(
By
.
Id
(
"slideBlock"
))).
GetScreenshot
();
((
IJavaScriptExecutor
)
driver
).
ExecuteScript
(
"document.getElementById(\"slideBg\").style.opacity = 1;"
);
var
dirpath
=
$"
{
Environment
.
CurrentDirectory
}
\\geetest"
;
if
(!
Directory
.
Exists
(
dirpath
))
{
Directory
.
CreateDirectory
(
dirpath
);
}
var
fileBgPath
=
$"
{
dirpath
}
\\
{
DateTime
.
Now
.
Ticks
}
.png"
;
var
fileBlockPath
=
$"
{
dirpath
}
\\
{
DateTime
.
Now
.
Ticks
}
__1.png"
;
bgPng
.
SaveAsFile
(
fileBgPath
,
ScreenshotImageFormat
.
Png
);
blockPng
.
SaveAsFile
(
fileBlockPath
,
ScreenshotImageFormat
.
Png
);
var
bgX
=
FireFoxGetBoundary
(
fileBgPath
,
fileBlockPath
);
...
...
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