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
2c817811
Commit
2c817811
authored
Sep 14, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
7448104f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
176 additions
and
18 deletions
+176
-18
.gitignore
.gitignore
+1
-0
ICourseRepository.cs
EduSpider.IRepository/ICourseRepository.cs
+7
-0
ICourseStudentRepository.cs
EduSpider.IRepository/ICourseStudentRepository.cs
+7
-0
CourseRepository.cs
EduSpider.Repository/CourseRepository.cs
+20
-0
CourseStudentRepository.cs
EduSpider.Repository/CourseStudentRepository.cs
+13
-0
ClassInAccountManager.cs
EduSpider/Spiders/ClassInRule/ClassInAccountManager.cs
+2
-5
CourseManager.cs
EduSpider/Spiders/ClassInRule/CourseManager.cs
+126
-13
No files found.
.gitignore
View file @
2c817811
...
...
@@ -4,3 +4,4 @@ obj/
EduSpider.WebApi/EduSpider.WebApi.csproj.user
EduSpider.WebApi/Properties/PublishProfiles/FolderProfile.pubxml.user
EduSpider/EduSpider.csproj.user
EduSpider.WebApi/Properties/PublishProfiles/FolderProfile.pubxml
EduSpider.IRepository/ICourseRepository.cs
View file @
2c817811
...
...
@@ -25,6 +25,13 @@ namespace EduSpider.Repository
/// <returns></returns>
public
bool
BatchSetCourseOtherRepository
(
List
<
rb_course_hk
>
courses
);
/// <summary>
/// 批量修改录树
/// </summary>
/// <param name="courses"></param>
/// <returns></returns>
public
bool
BatchSetCourseRecordNumRepository
(
List
<
rb_course_hk
>
courses
);
/// <summary>
/// 获取课程分页列表
/// </summary>
...
...
EduSpider.IRepository/ICourseStudentRepository.cs
View file @
2c817811
...
...
@@ -19,6 +19,13 @@ namespace EduSpider.Repository
/// <returns></returns>
public
bool
BatchSetCourseStudentRepository
(
List
<
RB_Course_Student
>
courses
);
/// <summary>
/// 批量删除课程学员
/// </summary>
/// <param name="courses"></param>
/// <returns></returns>
public
bool
BatchDeleteCourseStudentRepository
(
List
<
RB_Course_Student
>
courses
);
/// <summary>
/// 跟进查询条件获取课程学员列表
...
...
EduSpider.Repository/CourseRepository.cs
View file @
2c817811
...
...
@@ -45,6 +45,26 @@ WHERE courseId=@courseId ";
return
Execute
(
sql
,
parameters
)
>
0
;
}
/// <summary>
/// 批量修改其他字段
/// </summary>
/// <param name="courses"></param>
/// <returns></returns>
public
bool
BatchSetCourseRecordNumRepository
(
List
<
rb_course_hk
>
courses
)
{
var
parameters
=
new
DynamicParameters
();
string
sql
=
@"
UPDATE rb_course_hk
SET RecordNum=@RecordNum
WHERE courseId=@courseId "
;
parameters
.
Add
(
"RecordNum"
,
courses
[
0
].
RecordNum
);
parameters
.
Add
(
"courseId"
,
courses
[
0
].
CourseId
);
return
Execute
(
sql
,
parameters
)
>
0
;
}
/// <summary>
/// 获取课程列表
/// </summary>
...
...
EduSpider.Repository/CourseStudentRepository.cs
View file @
2c817811
...
...
@@ -26,6 +26,19 @@ namespace EduSpider.Repository
return
flag
;
}
/// <summary>
/// 批量删除课程学员
/// </summary>
/// <param name="courses"></param>
/// <returns></returns>
public
bool
BatchDeleteCourseStudentRepository
(
List
<
RB_Course_Student
>
courses
)
{
string
sql
=
string
.
Format
(
"DELETE FROM RB_Course_Student WHERE courseId IN({0}) "
,
string
.
Join
(
","
,
courses
.
Select
(
qitem
=>
qitem
.
courseId
)));
return
base
.
Execute
(
sql
)
>
0
;
}
/// <summary>
/// 跟进查询条件获取课程学员列表
/// </summary>
...
...
EduSpider/Spiders/ClassInRule/ClassInAccountManager.cs
View file @
2c817811
using
EduSpider.Utility.Plugin
;
using
OpenCvSharp
;
using
OpenQA.Selenium
;
using
OpenQA.Selenium.Chrome
;
using
OpenQA.Selenium.Firefox
;
using
OpenQA.Selenium.Interactions
;
using
OpenQA.Selenium.Support.UI
;
using
System
;
using
System.Drawing
;
using
System.IO
;
using
System.Net
;
using
System.Net.Http
;
...
...
@@ -83,12 +81,11 @@ namespace TicketSpider.Spiders.ClassInRule
//google隐身模式
//option.AddArgument("headless");
//火狐隐身模式
//
option.AddArgument("--headless");
option
.
AddArgument
(
"--headless"
);
//option.AddArgument("--disable-gpu");
// option.AddArgument("ingore-certificate-errors");
}
option
.
AddArgument
(
"--headless"
);
option
.
AddArgument
(
"--disable-infobars"
);
option
.
AddArgument
(
"window-size=1920*1080"
);
// option.AddArgument("user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:104.0) Gecko/20100101 Firefox/104.0");
...
...
@@ -131,7 +128,7 @@ namespace TicketSpider.Spiders.ClassInRule
//开始登录
buttonEle
.
Click
();
//开始模拟登录
for
(
var
loginCount
=
0
;
loginCount
<=
4
;
loginCount
++)
for
(
var
loginCount
=
0
;
loginCount
<=
3
;
loginCount
++)
{
InfoHelper
.
WriteLine
(
$"正在进行第
{
loginCount
}
次模拟登录..."
);
VTX
.
FW
.
Helper
.
LogHelper
.
WriteInfo
(
"RunAsync"
,
$"正在进行第
{
loginCount
}
次模拟登录..."
);
...
...
EduSpider/Spiders/ClassInRule/CourseManager.cs
View file @
2c817811
This diff is collapsed.
Click to expand it.
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