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
efd1ebf2
Commit
efd1ebf2
authored
May 25, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
872484ac
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
173 additions
and
11 deletions
+173
-11
RB_Course.cs
EduSpider.Model/Entity/RB_Course.cs
+114
-0
CourseStatusEnum.cs
EduSpider.Utility/Enum/CourseStatusEnum.cs
+28
-0
CourseTypeEnum.cs
EduSpider.Utility/Enum/CourseTypeEnum.cs
+22
-0
EduSpider.sln
EduSpider.sln
+1
-7
Program.cs
EduSpider/Program.cs
+2
-2
ClassInFlow.cs
EduSpider/Spiders/ClassInRule/ClassInFlow.cs
+5
-1
StudentManager.cs
EduSpider/Spiders/ClassInRule/StudentManager.cs
+1
-1
No files found.
EduSpider.Model/Entity/RB_Course.cs
0 → 100644
View file @
efd1ebf2
using
EduSpider.Utility.Enum
;
using
System
;
using
VTX.FW.Attr
;
namespace
EduSpider.Model.Entity
{
/// <summary>
/// 课程实体类
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Course
{
/// <summary>
/// 课程编号
/// </summary>
public
int
courseId
{
get
;
set
;
}
/// <summary>
/// 课程名称
/// </summary>
public
string
courseName
{
get
;
set
;
}
/// <summary>
/// 首次课日期
/// </summary>
public
DateTime
?
beginTime
{
get
;
set
;
}
/// <summary>
/// 完成次数
/// </summary>
public
int
?
completeNum
{
get
;
set
;
}
/// <summary>
/// 总次数
/// </summary>
public
int
?
totalClassNum
{
get
;
set
;
}
/// <summary>
/// 有效日期
/// </summary>
public
DateTime
?
expiryTime
{
get
;
set
;
}
/// <summary>
/// 直播数
/// </summary>
public
int
?
liveNum
{
get
;
set
;
}
/// <summary>
/// 录课数
/// </summary>
public
int
?
recordNum
{
get
;
set
;
}
/// <summary>
/// 回放数
/// </summary>
public
int
?
openNum
{
get
;
set
;
}
/// <summary>
/// 学生数
/// </summary>
public
int
?
studentNum
{
get
;
set
;
}
/// <summary>
/// 旁听数
/// </summary>
public
int
?
auditNum
{
get
;
set
;
}
/// <summary>
/// 教师数
/// </summary>
public
int
?
teacherNum
{
get
;
set
;
}
/// <summary>
/// 课程状态(未结课,课程进度未完成,已结课)
/// </summary>
public
CourseStatusEnum
courseStatus
{
get
;
set
;
}
/// <summary>
/// 回放地址
/// </summary>
public
string
webCast
{
get
;
set
;
}
/// <summary>
/// 班主任编号
/// </summary>
public
int
?
teacherId
{
get
;
set
;
}
/// <summary>
/// 班主任账号
/// </summary>
public
string
teacherAccount
{
get
;
set
;
}
/// <summary>
/// 班主任账号Id
/// </summary>
public
int
?
teacherUid
{
get
;
set
;
}
/// <summary>
/// 班主任姓名
/// </summary>
public
string
teacherName
{
get
;
set
;
}
/// <summary>
/// 班主任头像
/// </summary>
public
string
teacherLogo
{
get
;
set
;
}
/// <summary>
/// 课程类型(1-标准课,公开课)
/// </summary>
public
CourseTypeEnum
courseType
{
get
;
set
;
}
}
}
EduSpider.
Model/Entity/Course
.cs
→
EduSpider.
Utility/Enum/CourseStatusEnum
.cs
View file @
efd1ebf2
using
System
;
using
VTX.FW.Attr
;
using
VTX.FW.Attr
;
namespace
EduSpider.
Model.Entity
namespace
EduSpider.
Utility.Enum
{
/// <summary>
/// 课程
实体类
/// 课程
状态
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Course
public
enum
CourseStatusEnum
{
/// <summary>
///
课程编号
///
未结课
/// </summary>
public
int
courseId
{
get
;
set
;
}
[
EnumField
(
"未结课"
)]
NotFinish
=
1
,
/// <summary>
///
课程名称
///
已结课
/// </summary>
public
string
courseName
{
get
;
set
;
}
[
EnumField
(
"已结课"
)]
Finished
=
2
,
/// <summary>
///
开始时间
///
课程进度未完成
/// </summary>
public
int
beginTime
{
get
;
set
;
}
[
EnumField
(
"课程进度未完成"
)]
NotSchedule
=
3
,
}
}
EduSpider.Utility/Enum/CourseTypeEnum.cs
0 → 100644
View file @
efd1ebf2
using
VTX.FW.Attr
;
namespace
EduSpider.Utility.Enum
{
/// <summary>
/// 课程类型枚举
/// </summary>
public
enum
CourseTypeEnum
{
/// <summary>
/// 标准课
/// </summary>
[
EnumField
(
"标准课"
)]
StandardClass
=
1
,
/// <summary>
/// 公开课
/// </summary>
[
EnumField
(
"公开课"
)]
PublicClass
=
2
,
}
}
EduSpider.sln
View file @
efd1ebf2
...
...
@@ -21,9 +21,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EduSpider.WebApi", "EduSpid
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EduSpider.Utility", "EduSpider.Utility\EduSpider.Utility.csproj", "{0C1E337D-74C6-45D7-94A5-4D5F4E552FC4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EduSpider", "EduSpider\EduSpider.csproj", "{DAC5E8C6-98DF-4B33-9E2C-452DDE54A5FA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ConsoleApp1", "ConsoleApp1\ConsoleApp1.csproj", "{4FB5873A-A964-4D19-AC8E-BD72A66190BF}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EduSpider", "EduSpider\EduSpider.csproj", "{DAC5E8C6-98DF-4B33-9E2C-452DDE54A5FA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
...
...
@@ -63,10 +61,6 @@ Global
{DAC5E8C6-98DF-4B33-9E2C-452DDE54A5FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DAC5E8C6-98DF-4B33-9E2C-452DDE54A5FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DAC5E8C6-98DF-4B33-9E2C-452DDE54A5FA}.Release|Any CPU.Build.0 = Release|Any CPU
{4FB5873A-A964-4D19-AC8E-BD72A66190BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FB5873A-A964-4D19-AC8E-BD72A66190BF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FB5873A-A964-4D19-AC8E-BD72A66190BF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4FB5873A-A964-4D19-AC8E-BD72A66190BF}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
...
...
EduSpider/Program.cs
View file @
efd1ebf2
...
...
@@ -10,8 +10,8 @@ namespace EduSpider
static
void
Main
(
string
[]
args
)
{
ThreadPool
.
SetMaxThreads
(
255
,
255
);
ThreadPool
.
SetMinThreads
(
255
,
255
);
//
ThreadPool.SetMaxThreads(255, 255);
//
ThreadPool.SetMinThreads(255, 255);
new
ClassInFlow
().
StartAsync
();
...
...
EduSpider/Spiders/ClassInRule/ClassInFlow.cs
View file @
efd1ebf2
...
...
@@ -18,7 +18,11 @@ namespace TicketSpider.Spiders.ClassInRule
public
async
void
StartAsync
()
{
Console
.
WriteLine
(
"开始模拟登录信息......."
);
string
loginCookies
=
ClassInAccountManager
.
GetInstance
();
string
loginCookies
=
""
;
//loginCookies= ClassInAccountManager.GetInstance();
loginCookies
=
"_eeos_uid=12780052; _eeos_useraccount=18140082327; _eeos_userlogo=%2Fupload%2Fimages%2F20200126%2F709df9532bee722f2268_70.jpg; _eeos_domain=.eeo.cn; _eeos_remember=1; _eeos_sid=12780052; _eeos_nsid=kspGu2gfMu%2BU2EFgLpSGyg%3D%3D; sensorsdata2015jssdkcross=%7B%22distinct_id%22%3A%2212780052%22%2C%22first_id%22%3A%22180f59907abbed-081e4952c5b26f-12333272-2073600-180f59907acbc8%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E7%9B%B4%E6%8E%A5%E6%B5%81%E9%87%8F%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC_%E7%9B%B4%E6%8E%A5%E6%89%93%E5%BC%80%22%2C%22%24latest_referrer%22%3A%22%22%7D%2C%22%24device_id%22%3A%22180f59907abbed-081e4952c5b26f-12333272-2073600-180f59907acbc8%22%7D; _eeos_traffic=EqlIOFq4S2hz5FTTtHzNUViBYcWCixrJYMCF6Y5yJuD8eq8ZwPvVSHMvUkLFA5lzNoaTrDBpGhFOuRmo3R6CQ5GeSsJx1IEakyt2K%2B3ifco%3D; PHPSESSID=3etqs18ka2s425omq6uqsus8s2; __tk_id=7a20b97a04709afc3137ec211e756d5f"
;
Console
.
WriteLine
(
"开始获取学员信息"
);
new
StudentManager
().
RunAsync
(
loginCookies
);
new
StudentManager
().
RunCourse
(
loginCookies
);
...
...
EduSpider/Spiders/ClassInRule/StudentManager.cs
View file @
efd1ebf2
...
...
@@ -27,7 +27,7 @@ namespace EduSpider.Spiders.ClassInRule
public
async
void
RunCourse
(
string
cookie
)
{
var
request
=
Utility
.
HttpHelper
.
GenerateHttp
(
cookie
);
var
paramStr
=
"page=1&perpage=20&courseState=1"
;
string
paramStr
=
string
.
Format
(
"page={0}&perpage=20&courseState=1"
,
"1"
)
;
var
content
=
new
StringContent
(
paramStr
,
System
.
Text
.
Encoding
.
UTF8
,
"application/x-www-form-urlencoded"
);
var
response
=
await
request
.
PostAsync
(
"https://console.eeo.cn/saasajax/course.ajax.php?action=getCourseList"
,
content
);
...
...
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