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
9cc7a8e0
Commit
9cc7a8e0
authored
Jul 24, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
dbda263b
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
249 additions
and
14 deletions
+249
-14
RB_Travel_Config.cs
src/DotnetSpider.Spiders/Model/RB_Travel_Config.cs
+5
-0
SouthEastDetailsSpider.cs
...der.Spiders/Rules/SouthSastRule/SouthEastDetailsSpider.cs
+234
-6
SouthEastListSpider.cs
...Spider.Spiders/Rules/SouthSastRule/SouthEastListSpider.cs
+7
-3
SouthEastServicer.cs
...etSpider.Spiders/Rules/SouthSastRule/SouthEastServicer.cs
+3
-5
No files found.
src/DotnetSpider.Spiders/Model/RB_Travel_Config.cs
View file @
9cc7a8e0
...
@@ -363,6 +363,11 @@ namespace DotnetSpider.Spiders.Model
...
@@ -363,6 +363,11 @@ namespace DotnetSpider.Spiders.Model
/// </summary>
/// </summary>
public
string
KeyInfo
{
get
;
set
;
}
public
string
KeyInfo
{
get
;
set
;
}
/// <summary>
/// 直客价
/// </summary>
public
decimal
B2CPrice
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 行程特色
/// 行程特色
/// </summary>
/// </summary>
...
...
src/DotnetSpider.Spiders/Rules/SouthSastRule/SouthEastDetailsSpider.cs
View file @
9cc7a8e0
This diff is collapsed.
Click to expand it.
src/DotnetSpider.Spiders/Rules/SouthSastRule/SouthEastListSpider.cs
View file @
9cc7a8e0
...
@@ -155,7 +155,9 @@ namespace DotnetSpider.Spiders.Rules.SouthSastRule
...
@@ -155,7 +155,9 @@ namespace DotnetSpider.Spiders.Rules.SouthSastRule
keyInfo
.
Add
(
"code"
,
x
[
"prodNo"
].
ToString
());
keyInfo
.
Add
(
"code"
,
x
[
"prodNo"
].
ToString
());
keyInfo
.
Add
(
"travelCode"
,
x
[
"travelCode"
].
ToString
());
keyInfo
.
Add
(
"travelCode"
,
x
[
"travelCode"
].
ToString
());
keyInfo
.
Add
(
"travelName"
,
x
[
"travelName"
].
ToString
());
keyInfo
.
Add
(
"travelName"
,
x
[
"travelName"
].
ToString
());
SouthEastServicer
.
TRAVEL_CONFIGS
.
Add
(
new
RB_Travel_Config
var
price
=
x
[
"price"
].
ToObject
<
JObject
>();
decimal
.
TryParse
(
price
[
"b2cPrice"
].
ToString
(),
out
decimal
b2cPrice
);
var
config
=
new
RB_Travel_Config
{
{
RealLink
=
string
.
Format
(
"https://trip.settour.com.tw/taiwan/product/{0}"
,
x
[
"prodNo"
].
ToString
()),
RealLink
=
string
.
Format
(
"https://trip.settour.com.tw/taiwan/product/{0}"
,
x
[
"prodNo"
].
ToString
()),
KeyInfo
=
keyInfo
.
ToString
(),
KeyInfo
=
keyInfo
.
ToString
(),
...
@@ -187,8 +189,10 @@ namespace DotnetSpider.Spiders.Rules.SouthSastRule
...
@@ -187,8 +189,10 @@ namespace DotnetSpider.Spiders.Rules.SouthSastRule
TravelState
=
1
,
TravelState
=
1
,
UpdateBy
=
0
,
UpdateBy
=
0
,
VideoStr
=
string
.
Empty
,
VideoStr
=
string
.
Empty
,
YSeat
=
20
YSeat
=
20
,
});
B2CPrice
=
b2cPrice
};
SouthEastServicer
.
TRAVEL_CONFIGS
.
Add
(
config
);
}
}
}
}
}
}
...
...
src/DotnetSpider.Spiders/Rules/SouthSastRule/SouthEastServicer.cs
View file @
9cc7a8e0
...
@@ -22,7 +22,7 @@ namespace DotnetSpider.Spiders.Rules.SouthSastRule
...
@@ -22,7 +22,7 @@ namespace DotnetSpider.Spiders.Rules.SouthSastRule
{
{
URL
=
"https://gql.settour.com.tw/graphql"
,
URL
=
"https://gql.settour.com.tw/graphql"
,
StartDate
=
DateTime
.
Now
.
AddDays
(
1
).
ToString
(
"yyyyMMdd"
),
StartDate
=
DateTime
.
Now
.
AddDays
(
1
).
ToString
(
"yyyyMMdd"
),
EndDate
=
DateTime
.
Now
.
AddDays
(
2
).
ToString
(
"yyyyMMdd"
),
EndDate
=
DateTime
.
Now
.
AddDays
(
1
).
ToString
(
"yyyyMMdd"
),
TotalPage
=
1
,
TotalPage
=
1
,
Origin
=
"https://trip.settour.com.tw"
Origin
=
"https://trip.settour.com.tw"
};
};
...
@@ -46,12 +46,10 @@ namespace DotnetSpider.Spiders.Rules.SouthSastRule
...
@@ -46,12 +46,10 @@ namespace DotnetSpider.Spiders.Rules.SouthSastRule
//await SouthEastProdHtmlDetailsSpider.RunAsync();
//await SouthEastProdHtmlDetailsSpider.RunAsync();
Console
.
WriteLine
(
"COnfig:"
+
Newtonsoft
.
Json
.
JsonConvert
.
SerializeObject
(
TRAVEL_CONFIGS
));
Console
.
WriteLine
(
"********* SouthEastService_End ************"
);
//保存数据
//保存数据
await
SouthEastStorageSpider
.
RunAsync
();
await
SouthEastStorageSpider
.
RunAsync
();
Console
.
WriteLine
(
"********* SouthEastService_End ************"
);
}
}
}
}
...
...
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