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
0e43823a
Commit
0e43823a
authored
Jul 31, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
9c60995d
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
8 deletions
+17
-8
RB_Travel_Config_Clone.cs
src/DotnetSpider.Spiders/Model/RB_Travel_Config_Clone.cs
+5
-0
Program.cs
src/DotnetSpider.Spiders/Program.cs
+6
-3
BestListSpider.cs
src/DotnetSpider.Spiders/Rules/BestRule/BestListSpider.cs
+1
-1
BestPageSpider.cs
src/DotnetSpider.Spiders/Rules/BestRule/BestPageSpider.cs
+1
-1
BestTravelDetailSpider.cs
...etSpider.Spiders/Rules/BestRule/BestTravelDetailSpider.cs
+1
-1
BestTravelPriceSpider.cs
...netSpider.Spiders/Rules/BestRule/BestTravelPriceSpider.cs
+1
-1
BwtListSpider.cs
src/DotnetSpider.Spiders/Rules/BwtRule/BwtListSpider.cs
+2
-1
No files found.
src/DotnetSpider.Spiders/Model/RB_Travel_Config_Clone.cs
View file @
0e43823a
...
...
@@ -358,5 +358,10 @@ namespace DotnetSpider.Spiders.Model
/// 关键信息
/// </summary>
public
string
KeyInfo
{
get
;
set
;
}
/// <summary>
/// 是否同步
/// </summary>
public
int
IsSynchronous
{
get
;
set
;
}
}
}
src/DotnetSpider.Spiders/Program.cs
View file @
0e43823a
...
...
@@ -47,17 +47,20 @@ namespace DotnetSpider.Spiders
//ʨ
//await new LionService().RunAsync();
Console
.
WriteLine
(
"ʨ****End"
);
//ϲ
//await new BestService().RunAsync();
//Console.WriteLine("ϲ****End");
//
//await new BwtService().RunAsync();
await
new
BwtService
().
RunAsync
();
Console
.
WriteLine
(
"****End"
);
//
await
new
SouthEastServicer
().
RunAsync
();
//
await new SouthEastServicer().RunAsync();
Console
.
WriteLine
(
"
End...
"
);
Console
.
WriteLine
(
"
****End
"
);
Environment
.
Exit
(
0
);
}
}
...
...
src/DotnetSpider.Spiders/Rules/BestRule/BestListSpider.cs
View file @
0e43823a
...
...
@@ -45,7 +45,7 @@ namespace DotnetSpider.Spiders.Rules.BestRule
{
var
request
=
new
Request
(
$"https://travel-api.ittms.com.tw/travel/getmany/v1"
);
request
.
Method
=
"POST"
;
var
param
=
$"date_to=2020/12/31&available_flag=&special_icon_code=&data_type=1&date=20200716162954&travel_list_code=11&ittms_code=C000061&takeoff_city=&page_count=100&travel_list=&sort_type=D&account=IttmsApp&date_from=2020/07/18&page=
{
i
}
&travel_title=&checksum=
362073AB28
"
;
var
param
=
$"date_to=2020/12/31&available_flag=&special_icon_code=&data_type=1&date=20200716162954&travel_list_code=11&ittms_code=C000061&takeoff_city=&page_count=100&travel_list=&sort_type=D&account=IttmsApp&date_from=2020/07/18&page=
{
i
}
&travel_title=&checksum=
7242FBC6E3
"
;
var
content
=
new
StringContent
(
param
,
"application/x-www-form-urlencoded"
,
"UTF-8"
);
request
.
Content
=
MessagePackSerializer
.
Typeless
.
Serialize
(
content
);
requests
.
Add
(
request
);
...
...
src/DotnetSpider.Spiders/Rules/BestRule/BestPageSpider.cs
View file @
0e43823a
...
...
@@ -39,7 +39,7 @@ namespace DotnetSpider.Spiders.Rules.BestRule
AddDataFlow
(
new
PagerParser
());
var
request
=
new
Request
(
$"https://travel-api.ittms.com.tw/travel/getmany/v1"
);
request
.
Method
=
"POST"
;
var
param
=
"date_to=2020/12/31&available_flag=&special_icon_code=&data_type=1&date=20200716162954&travel_list_code=11&ittms_code=C000061&takeoff_city=&page_count=5000&travel_list=&sort_type=D&account=IttmsApp&date_from=2020/07/18&page=1&travel_title=&checksum=
362073AB28
"
;
var
param
=
"date_to=2020/12/31&available_flag=&special_icon_code=&data_type=1&date=20200716162954&travel_list_code=11&ittms_code=C000061&takeoff_city=&page_count=5000&travel_list=&sort_type=D&account=IttmsApp&date_from=2020/07/18&page=1&travel_title=&checksum=
7242FBC6E3
"
;
var
content
=
new
StringContent
(
param
,
"application/x-www-form-urlencoded"
,
"UTF-8"
);
request
.
Content
=
MessagePackSerializer
.
Typeless
.
Serialize
(
content
);
...
...
src/DotnetSpider.Spiders/Rules/BestRule/BestTravelDetailSpider.cs
View file @
0e43823a
...
...
@@ -51,7 +51,7 @@ namespace DotnetSpider.Spiders.Rules.BestRule
{
BestService
.
TRAVEL_CONFIGS
.
ForEach
(
x
=>
{
var
keys
=
JObject
.
Parse
(
x
.
KeyInfo
);
var
param
=
$"travel_no=
{
keys
[
"no"
].
ToString
()}
&date_to=&data_type=4&date=20200716162954&ittms_code=
{
keys
[
"code"
].
ToString
()}
&takeoff_city=&page_count=50&travel_list=&country=&sort_type=D&account=IttmsApp&date_from=&page=&travel_title=&checksum=
362073AB28
&keywords=&"
;
var
param
=
$"travel_no=
{
keys
[
"no"
].
ToString
()}
&date_to=&data_type=4&date=20200716162954&ittms_code=
{
keys
[
"code"
].
ToString
()}
&takeoff_city=&page_count=50&travel_list=&country=&sort_type=D&account=IttmsApp&date_from=&page=&travel_title=&checksum=
7242FBC6E3
&keywords=&"
;
var
content
=
new
StringContent
(
param
,
"application/x-www-form-urlencoded"
,
"UTF-8"
);
var
request
=
new
Request
(
"https://travel-api.ittms.com.tw/travel/getmany/v1?id="
+
x
.
AgentId
)
{
...
...
src/DotnetSpider.Spiders/Rules/BestRule/BestTravelPriceSpider.cs
View file @
0e43823a
...
...
@@ -50,7 +50,7 @@ namespace DotnetSpider.Spiders.Rules.BestRule
{
BestService
.
TRAVEL_CONFIGS
.
ForEach
(
x
=>
{
var
keys
=
JObject
.
Parse
(
x
.
KeyInfo
);
var
param
=
$"travel_title_key=
{
x
.
AgentId
}
&date_to=2021/07/15&available_flag=&special_icon_code=&data_type=1&date=20200716162954&ittms_code=
{
keys
[
"code"
].
ToString
()}
&takeoff_city=&page_count=5000&travel_list=&sort_type=D&account=IttmsApp&date_from=2020/07/16&page=1&travel_title=
{
x
.
Title
}
&checksum=
362073AB28
&"
;
var
param
=
$"travel_title_key=
{
x
.
AgentId
}
&date_to=2021/07/15&available_flag=&special_icon_code=&data_type=1&date=20200716162954&ittms_code=
{
keys
[
"code"
].
ToString
()}
&takeoff_city=&page_count=5000&travel_list=&sort_type=D&account=IttmsApp&date_from=2020/07/16&page=1&travel_title=
{
x
.
Title
}
&checksum=
7242FBC6E3
&"
;
var
content
=
new
StringContent
(
param
,
"application/x-www-form-urlencoded"
,
"UTF-8"
);
var
request
=
new
Request
(
"https://travel-api.ittms.com.tw/travel/getmany/v1?id="
+
x
.
AgentId
)
{
...
...
src/DotnetSpider.Spiders/Rules/BwtRule/BwtListSpider.cs
View file @
0e43823a
...
...
@@ -156,7 +156,8 @@ namespace DotnetSpider.Spiders.Rules.BwtRule
TravelState
=
1
,
UpdateBy
=
0
,
VideoStr
=
string
.
Empty
,
YSeat
=
20
YSeat
=
20
,
B2CPrice
=
0
,
};
BwtService
.
TRAVEL_CONFIGS
.
Add
(
exsit
);
}
...
...
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