Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
spider
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
spider
Commits
9122ba74
Commit
9122ba74
authored
Jul 27, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
爬虫修改
parent
9cc7a8e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
SouthEastDetailsSpider.cs
...der.Spiders/Rules/SouthSastRule/SouthEastDetailsSpider.cs
+17
-1
SouthEastListSpider.cs
...Spider.Spiders/Rules/SouthSastRule/SouthEastListSpider.cs
+1
-0
No files found.
src/DotnetSpider.Spiders/Rules/SouthSastRule/SouthEastDetailsSpider.cs
View file @
9122ba74
...
...
@@ -435,7 +435,23 @@ namespace DotnetSpider.Spiders.Rules.SouthSastRule
var
pItem
=
jItem
.
ToObject
<
JObject
>();
string
dateStr
=
pItem
[
"date"
].
ToString
();
string
newDateStr
=
dateStr
.
Substring
(
0
,
4
)+
"-"
+
dateStr
.
Substring
(
4
,
2
)+
"-"
+
dateStr
.
Substring
(
6
,
2
);
decimal
.
TryParse
(
pItem
[
"b2cPrice"
].
ToString
(),
out
decimal
b2cPrice
);
decimal
b2cPrice
=
0
;
try
{
if
(
pItem
.
ContainsKey
(
"b2cPrice"
))
{
decimal
.
TryParse
(
pItem
[
"b2cPrice"
].
ToString
(),
out
b2cPrice
);
}
if
(
pItem
.
ContainsKey
(
"price"
))
{
decimal
.
TryParse
(
pItem
[
"price"
].
ToString
(),
out
b2cPrice
);
}
}
catch
(
Exception
ex
)
{
}
if
(
b2cPrice
<=
0
)
{
b2cPrice
=
item
.
B2CPrice
;
...
...
src/DotnetSpider.Spiders/Rules/SouthSastRule/SouthEastListSpider.cs
View file @
9122ba74
...
...
@@ -62,6 +62,7 @@ namespace DotnetSpider.Spiders.Rules.SouthSastRule
{
AddDataFlow
(
new
ListParser
());
List
<
Request
>
requests
=
new
List
<
Request
>();
SouthEastRequest
.
TotalPage
=
2
;
for
(
int
i
=
1
;
i
<=
SouthEastRequest
.
TotalPage
;
i
++)
{
var
request
=
new
Request
(
SouthEastRequest
.
URL
);
...
...
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