Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
加钱居士.
foot
提交
e5feb97f
F
foot
项目概览
加钱居士.
/
foot
通知
3
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
foot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e5feb97f
编写于
3月 13, 2020
作者:
M
monomania
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.修改bug
上级
15b8e356
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
12 deletion
+16
-12
FS000.go
FS000.go
+3
-2
foot-spider/launch/FS101PortalApplication.go
foot-spider/launch/FS101PortalApplication.go
+3
-3
foot-spider/module/win007/proc/LeagueSeasonProcesser.go
foot-spider/module/win007/proc/LeagueSeasonProcesser.go
+4
-1
foot-spider/module/win007/proc/MatchHisProcesser.go
foot-spider/module/win007/proc/MatchHisProcesser.go
+6
-6
未找到文件。
FS000.go
浏览文件 @
e5feb97f
...
...
@@ -14,8 +14,9 @@ func main() {
parse2
:=
add
.
Format
(
"2006"
)
fmt
.
Println
(
parse
)
fmt
.
Println
(
parse2
)
launch
.
Spider_match_his
(
"2019"
)
launch
.
Spider_History
()
//launch.Spider_match_his("2019")
//launch.Spider_History()
launch
.
Spider_leagueSeason
()
}
foot-spider/launch/FS101PortalApplication.go
浏览文件 @
e5feb97f
...
...
@@ -72,11 +72,11 @@ func Spider_History() {
for
_
,
v
:=
range
seasons
{
Spider_match_his
(
v
)
time
.
Sleep
(
5
8
*
time
.
Minute
)
time
.
Sleep
(
2
8
*
time
.
Minute
)
Spider_baseFace_his
(
v
)
time
.
Sleep
(
5
8
*
time
.
Minute
)
time
.
Sleep
(
2
8
*
time
.
Minute
)
Spider_asiaLastNew_his
(
v
)
time
.
Sleep
(
5
8
*
time
.
Minute
)
time
.
Sleep
(
2
8
*
time
.
Minute
)
Spider_euroLast_his
(
v
)
time
.
Sleep
(
58
*
time
.
Minute
)
Spider_euroHis_his
(
v
)
...
...
foot-spider/module/win007/proc/LeagueSeasonProcesser.go
浏览文件 @
e5feb97f
...
...
@@ -152,7 +152,10 @@ func (this *LeagueSeasonProcesser) season_process(htmlParser *goquery.Document,
})
//3.处理round
htmlParser
.
Find
(
"select[id='selRound'] option"
)
.
Each
(
func
(
i
int
,
selection
*
goquery
.
Selection
)
{
temp_round_str
:=
strings
.
TrimSpace
(
selection
.
Text
())
temp_round_str
,
exist
:=
selection
.
Attr
(
"value"
)
if
!
exist
{
return
;
}
if
len
(
temp_round_str
)
<=
0
{
return
}
...
...
foot-spider/module/win007/proc/MatchHisProcesser.go
浏览文件 @
e5feb97f
...
...
@@ -59,9 +59,9 @@ func (this *MatchHisProcesser) Startup() {
url
=
strings
.
Replace
(
url
,
"${leagueId}"
,
v
.
LeagueId
,
1
)
url
=
strings
.
Replace
(
url
,
"${subId}"
,
"0"
,
1
)
var
i
int
for
;
i
<
v
.
Round
;
i
++
{
round_url
:=
strings
.
Replace
(
url
,
"${round}"
,
"1"
,
1
)
i
:=
1
for
;
i
<
=
v
.
Round
;
i
++
{
round_url
:=
strings
.
Replace
(
url
,
"${round}"
,
strconv
.
Itoa
(
i
)
,
1
)
this
.
sUrl_leagueId
[
round_url
]
=
v
.
LeagueId
this
.
sUrl_Season
[
round_url
]
=
v
newSpider
=
newSpider
.
AddUrl
(
round_url
,
"html"
)
...
...
@@ -70,7 +70,7 @@ func (this *MatchHisProcesser) Startup() {
newSpider
.
SetDownloader
(
down
.
NewMWin007Downloader
())
newSpider
=
newSpider
.
AddPipeline
(
pipeline
.
NewPipelineConsole
())
newSpider
.
SetSleepTime
(
"rand"
,
1000
,
2
0000
)
newSpider
.
SetSleepTime
(
"rand"
,
1000
,
1
0000
)
newSpider
.
SetThreadnum
(
1
)
.
Run
()
}
...
...
@@ -90,7 +90,7 @@ func (this *MatchHisProcesser) Process(p *page.Page) {
htmlParser
:=
p
.
GetHtmlParser
()
leagueId
:=
this
.
sUrl_leagueId
[
request
.
Url
]
this
.
LeagueSeasonProcesser
.
Init
()
this
.
LeagueSeasonProcesser
.
season_process
(
htmlParser
,
leagueId
,
request
.
Url
)
this
.
LeagueSeasonProcesser
.
season_process
(
htmlParser
,
leagueId
,
request
.
Url
)
//1.处理比赛
season
:=
this
.
sUrl_Season
[
request
.
Url
]
...
...
@@ -102,7 +102,7 @@ func (this *MatchHisProcesser) Process(p *page.Page) {
temp_id
=
strings
.
Replace
(
temp_id
,
"ToAnaly("
,
""
,
1
)
temp_id
=
strings
.
Replace
(
temp_id
,
",-1)"
,
""
,
1
)
temp_id
=
strings
.
TrimSpace
(
temp_id
)
base
.
Log
.
Info
(
"比赛ID为:"
,
temp_id
)
base
.
Log
.
Info
(
"比赛ID为:"
,
temp_id
,
",URL:"
+
request
.
Url
)
val_arr
:=
make
([]
string
,
0
)
selection
.
Find
(
"td"
)
.
Each
(
func
(
i
int
,
selection
*
goquery
.
Selection
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录