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
62a17476
Commit
62a17476
authored
Jun 06, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面下修改
parent
fea59667
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
4 deletions
+83
-4
Program.cs
EduSpider/Program.cs
+1
-1
SchoolCourseManager.cs
EduSpider/Spiders/SchoolHouseKeeper/SchoolCourseManager.cs
+82
-3
No files found.
EduSpider/Program.cs
View file @
62a17476
...
@@ -13,7 +13,7 @@ namespace EduSpider
...
@@ -13,7 +13,7 @@ namespace EduSpider
//ClassInFlow.StartAsync();
//ClassInFlow.StartAsync();
//校管家数据
//校管家数据
//
SchoolTaskHelper.RunTask();
SchoolTaskHelper
.
RunTask
();
Console
.
ReadLine
();
Console
.
ReadLine
();
...
...
EduSpider/Spiders/SchoolHouseKeeper/SchoolCourseManager.cs
View file @
62a17476
...
@@ -34,7 +34,7 @@ namespace EduSpider.Spiders.SchoolHouseKeeper
...
@@ -34,7 +34,7 @@ namespace EduSpider.Spiders.SchoolHouseKeeper
PageIndex
=
1
,
PageIndex
=
1
,
PageSize
=
10
PageSize
=
10
};
};
int
pageCount
;
int
pageCount
,
totalCount
;
string
url
=
"https://tms11.xiaogj.com/api/Shift/Query"
;
string
url
=
"https://tms11.xiaogj.com/api/Shift/Query"
;
//var request= Utility.SchoolHttpHelper.GenerateHttp(cookie);
//var request= Utility.SchoolHttpHelper.GenerateHttp(cookie);
...
@@ -51,8 +51,9 @@ namespace EduSpider.Spiders.SchoolHouseKeeper
...
@@ -51,8 +51,9 @@ namespace EduSpider.Spiders.SchoolHouseKeeper
{
{
JObject
jobj
=
JObject
.
Parse
(
result
);
JObject
jobj
=
JObject
.
Parse
(
result
);
pageCount
=
jobj
.
GetInt
(
"PageCount"
);
pageCount
=
jobj
.
GetInt
(
"PageCount"
);
totalCount
=
jobj
.
GetInt
(
"TotalCount"
);
list
.
AddRange
(
ParseJson
(
jobj
.
GetString
(
"Data"
)));
list
.
AddRange
(
ParseJson
(
jobj
.
GetString
(
"Data"
)));
Console
.
WriteLine
(
string
.
Format
(
"已完成
页{0}/{1},数据 {2}/{3}"
,
pageModel
.
PageIndex
,
pageCount
,
pageModel
.
PageSize
*
pageModel
.
PageIndex
,
list
.
Count
));
Console
.
WriteLine
(
string
.
Format
(
"已完成
第 {0} 页/共 {1} 页,已完成 {2} 条/总共 {3} 条"
,
pageModel
.
PageIndex
,
pageCount
,
pageModel
.
PageSize
*
pageModel
.
PageIndex
,
total
Count
));
if
(
pageCount
>
pageModel
.
PageIndex
)
if
(
pageCount
>
pageModel
.
PageIndex
)
{
{
Random
random
=
new
Random
();
Random
random
=
new
Random
();
...
@@ -67,7 +68,7 @@ namespace EduSpider.Spiders.SchoolHouseKeeper
...
@@ -67,7 +68,7 @@ namespace EduSpider.Spiders.SchoolHouseKeeper
JObject
subObj
=
JObject
.
Parse
(
subResult
);
JObject
subObj
=
JObject
.
Parse
(
subResult
);
list
.
AddRange
(
ParseJson
(
subObj
.
GetString
(
"Data"
)));
list
.
AddRange
(
ParseJson
(
subObj
.
GetString
(
"Data"
)));
}
}
Console
.
WriteLine
(
string
.
Format
(
"已完成
页{0}/{1},数据 {2}/{3}"
,
pageModel
.
PageIndex
,
pageCount
,
pageModel
.
PageSize
*
pageModel
.
PageIndex
,
list
.
Count
));
Console
.
WriteLine
(
string
.
Format
(
"已完成
第 {0} 页/共 {1} 页,已完成 {2} 条/总共 {3} 条"
,
pageModel
.
PageIndex
,
pageCount
,
pageModel
.
PageSize
*
pageModel
.
PageIndex
,
total
Count
));
}
}
}
}
}
}
...
@@ -125,5 +126,83 @@ namespace EduSpider.Spiders.SchoolHouseKeeper
...
@@ -125,5 +126,83 @@ namespace EduSpider.Spiders.SchoolHouseKeeper
/// 是否一对一
/// 是否一对一
/// </summary>
/// </summary>
public
int
IsOneToOne
{
get
;
set
;
}
public
int
IsOneToOne
{
get
;
set
;
}
public
string
ShiftTypeName
{
get
;
set
;
}
public
string
Unit
{
get
;
set
;
}
public
int
UnitCode
{
get
;
set
;
}
public
string
OriginalUnit
{
get
;
set
;
}
public
string
FormatedTermUnit
{
get
;
set
;
}
public
int
IsByTerm
{
get
;
set
;
}
public
int
CourseAmountPerTerm
{
get
;
set
;
}
public
decimal
TermPrice
{
get
;
set
;
}
public
decimal
UnitPrice
{
get
;
set
;
}
public
string
SubjectID
{
get
;
set
;
}
public
string
Describe
{
get
;
set
;
}
public
int
Order
{
get
;
set
;
}
public
int
Status
{
get
;
set
;
}
public
string
GradeName
{
get
;
set
;
}
public
string
SubjectName
{
get
;
set
;
}
public
string
CategoryName
{
get
;
set
;
}
public
int
CampusCountPermit
{
get
;
set
;
}
public
int
EnableSubject
{
get
;
set
;
}
public
int
ConsumeAmount
{
get
;
set
;
}
public
int
IsDynamicConsume
{
get
;
set
;
}
public
int
MinutesToTimes
{
get
;
set
;
}
public
int
StandardMinutes
{
get
;
set
;
}
public
int
CourseTimes
{
get
;
set
;
}
public
string
ClassTypeName
{
get
;
set
;
}
public
int
Year
{
get
;
set
;
}
public
string
Term
{
get
;
set
;
}
public
string
TermName
{
get
;
set
;
}
public
int
EnableShiftSpec
{
get
;
set
;
}
public
decimal
Price
{
get
;
set
;
}
public
string
ProductType
{
get
;
set
;
}
public
decimal
ShiftTotalPrice
{
get
;
set
;
}
public
decimal
ExportUnitPrice
{
get
;
set
;
}
public
int
NumberOfStudents
{
get
;
set
;
}
public
int
DateType
{
get
;
set
;
}
public
string
DateValue
{
get
;
set
;
}
public
int
UnitPriceByTerm
{
get
;
set
;
}
public
int
ShiftSpecRegion
{
get
;
set
;
}
public
int
MinStudentsAmount
{
get
;
set
;
}
public
int
IsDrainageClass
{
get
;
set
;
}
}
}
}
}
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