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
90e83d59
Commit
90e83d59
authored
Jun 17, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2222
parent
def8be30
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
18 deletions
+21
-18
CourseManager.cs
EduSpider/Spiders/ClassInRule/CourseManager.cs
+5
-3
QuestionManager.cs
EduSpider/Spiders/ClassInRule/QuestionManager.cs
+15
-14
appsettings.json
EduSpider/appsettings.json
+1
-1
No files found.
EduSpider/Spiders/ClassInRule/CourseManager.cs
View file @
90e83d59
...
@@ -322,16 +322,18 @@ namespace EduSpider.Spiders.ClassInRule
...
@@ -322,16 +322,18 @@ namespace EduSpider.Spiders.ClassInRule
CourseId
=
courseModel
.
CourseId
,
CourseId
=
courseModel
.
CourseId
,
TeacherIds
=
courseModel
.
TeacherUid
.
ToString
()
TeacherIds
=
courseModel
.
TeacherUid
.
ToString
()
}).
FirstOrDefault
();
}).
FirstOrDefault
();
teacherList
.
Add
(
new
RB_Course_Teacher
()
int
newId
=
Convert
.
ToInt32
(
DateTime
.
Now
.
ToString
(
"yyyyMMdd"
));
var
courseTeacher
=
new
RB_Course_Teacher
()
{
{
id
=
cTeacherModel
?.
id
??
0
,
id
=
cTeacherModel
?.
id
??
newId
,
uid
=
Convert
.
ToInt32
(
courseModel
.
TeacherUid
),
uid
=
Convert
.
ToInt32
(
courseModel
.
TeacherUid
),
phone
=
courseModel
.
TeacherAccount
,
phone
=
courseModel
.
TeacherAccount
,
logo
=
courseModel
.
TeacherLogo
,
logo
=
courseModel
.
TeacherLogo
,
name
=
courseModel
.
TeacherName
,
name
=
courseModel
.
TeacherName
,
courseId
=
courseId
,
courseId
=
courseId
,
courseTeacherId
=
courseModel
.
TeacherId
courseTeacherId
=
courseModel
.
TeacherId
});
};
teacherList
.
Add
(
courseTeacher
);
}
}
}
}
if
(
list
!=
null
&&
list
.
Count
>
0
)
if
(
list
!=
null
&&
list
.
Count
>
0
)
...
...
EduSpider/Spiders/ClassInRule/QuestionManager.cs
View file @
90e83d59
...
@@ -108,7 +108,6 @@ namespace EduSpider.Spiders.ClassInRule
...
@@ -108,7 +108,6 @@ namespace EduSpider.Spiders.ClassInRule
public
static
void
RequestExamDetail
(
string
cookie
,
int
courseId
,
int
examId
,
int
tid
,
ref
RB_HomeWork
m
)
public
static
void
RequestExamDetail
(
string
cookie
,
int
courseId
,
int
examId
,
int
tid
,
ref
RB_HomeWork
m
)
{
{
var
request
=
Utility
.
HttpHelper
.
GenerateHttp
(
cookie
);
var
request
=
Utility
.
HttpHelper
.
GenerateHttp
(
cookie
);
VTX
.
FW
.
Helper
.
LogHelper
.
WriteInfo
(
"RequestExamDetail"
,
$"正在查询测验详细信息"
);
VTX
.
FW
.
Helper
.
LogHelper
.
WriteInfo
(
"RequestExamDetail"
,
$"正在查询测验详细信息"
);
var
paramStr
=
$"courseId=
{
courseId
}
&examsId=[
{
examId
}
]&teachersId=[
{
tid
}
]&page=1&perpage=20"
;
var
paramStr
=
$"courseId=
{
courseId
}
&examsId=[
{
examId
}
]&teachersId=[
{
tid
}
]&page=1&perpage=20"
;
var
content
=
new
StringContent
(
paramStr
,
System
.
Text
.
Encoding
.
UTF8
,
"application/x-www-form-urlencoded"
);
var
content
=
new
StringContent
(
paramStr
,
System
.
Text
.
Encoding
.
UTF8
,
"application/x-www-form-urlencoded"
);
...
@@ -116,26 +115,28 @@ namespace EduSpider.Spiders.ClassInRule
...
@@ -116,26 +115,28 @@ namespace EduSpider.Spiders.ClassInRule
var
resultStr
=
response
.
Result
.
Content
.
ReadAsStringAsync
().
Result
??
string
.
Empty
;
var
resultStr
=
response
.
Result
.
Content
.
ReadAsStringAsync
().
Result
??
string
.
Empty
;
var
result
=
resultStr
.
TryToJObject
();
var
result
=
resultStr
.
TryToJObject
();
if
(
result
.
flag
)
if
(
result
.
flag
)
{
{
var
data
=
(
result
.
val
.
ContainsKey
(
"data"
)
?
result
.
val
[
"data"
]
:
new
JObject
())
as
JObject
;
var
data
=
(
result
.
val
.
ContainsKey
(
"data"
)
?
result
.
val
[
"data"
]
:
new
JObject
())
as
JObject
;
var
homeObj
=
(
data
[
"examsData"
]
as
JArray
)?.
FirstOrDefault
()
as
JObject
;
var
homeObj
=
(
data
[
"examsData"
]
as
JArray
)?.
FirstOrDefault
()
as
JObject
;
m
.
Num
=
homeObj
.
GetInt
(
"shouldStSum"
);
if
(
homeObj
!=
null
)
m
.
Cream_num
=
homeObj
.
GetInt
(
"excellentStSum"
);
{
m
.
Revised_num
=
0
;
//未匹配数据;
m
.
Num
=
homeObj
.
GetInt
(
"shouldStSum"
);
m
.
Rnum
=
homeObj
.
GetInt
(
"beReviewStSum"
);
m
.
Cream_num
=
homeObj
.
GetInt
(
"excellentStSum"
);
m
.
Cnum
=
homeObj
.
GetInt
(
"endStSum"
);
m
.
Revised_num
=
0
;
//未匹配数据;
m
.
Rnum
=
homeObj
.
GetInt
(
"beReviewStSum"
);
m
.
Cnum
=
homeObj
.
GetInt
(
"endStSum"
);
m
.
Score_value
=
homeObj
.
GetDecimal
(
"score_value"
);
m
.
Score_value
=
homeObj
.
GetDecimal
(
"score_value"
);
m
.
Th_cancel
=
string
.
Empty
;
m
.
Th_cancel
=
string
.
Empty
;
m
.
Ref_num
=
homeObj
.
GetInt
(
"needReStSum"
);
m
.
Ref_num
=
homeObj
.
GetInt
(
"needReStSum"
);
m
.
Refc_num
=
homeObj
.
GetInt
(
"alreadyReStSum"
);
m
.
Refc_num
=
homeObj
.
GetInt
(
"alreadyReStSum"
);
m
.
Av_score
=
homeObj
.
GetDecimal
(
"averageScore"
)/
100
;
m
.
Av_score
=
homeObj
.
GetDecimal
(
"averageScore"
)
/
100
;
m
.
Max_score
=
homeObj
.
GetDecimal
(
"highestScore"
)/
100
;
m
.
Max_score
=
homeObj
.
GetDecimal
(
"highestScore"
)
/
100
;
m
.
Min_score
=
homeObj
.
GetDecimal
(
"lowestScore"
)/
100
;
m
.
Min_score
=
homeObj
.
GetDecimal
(
"lowestScore"
)
/
100
;
}
}
}
}
}
...
...
EduSpider/appsettings.json
View file @
90e83d59
...
@@ -5,5 +5,5 @@
...
@@ -5,5 +5,5 @@
"DefaultConnectionPName"
:
"MySql.Data.MySqlClient"
"DefaultConnectionPName"
:
"MySql.Data.MySqlClient"
},
},
//ĬToken
//ĬToken
"DefaultToken"
:
""
"DefaultToken"
:
"
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; PHPSESSID=pv72vus2bq8l9t7dsa5c8f6ll2; locationArgumentLang=zh-CN; __tk_id=983ff2e12cab08755cb345a7043f801b; _eeos_uid=12780052; _eeos_useraccount=18140082327; _eeos_userlogo=%2Fupload%2Fimages%2F20200126%2F709df9532bee722f2268_70.jpg; _eeos_domain=.eeo.cn; _eeos_remember=1; _eeos_traffic=EqlIOFq4S2hz5FTTtHzNUViBYcWCixrJYMCF6Y5yJuD8eq8ZwPvVSHMvUkLFA5lzNoaTrDBpGhEJ4HgSuhP1iF%2B0dGt1KgDzV1r8UBfonWA%3D; _eeos_sid=12780052; _eeos_nsid=kspGu2gfMu%2BU2EFgLpSGyg%3D%3D
"
}
}
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