Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
加钱居士.
foot
提交
15b8e356
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,发现更多精彩内容 >>
提交
15b8e356
编写于
3月 13, 2020
作者:
S
shi.zeyuan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.xxx
上级
33b19bea
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
8 deletion
+13
-8
FS000.go
FS000.go
+1
-1
foot-spider/module/win007/proc/LeagueSeasonProcesser.go
foot-spider/module/win007/proc/LeagueSeasonProcesser.go
+9
-6
foot-spider/module/win007/proc/MatchHisProcesser.go
foot-spider/module/win007/proc/MatchHisProcesser.go
+3
-1
未找到文件。
FS000.go
浏览文件 @
15b8e356
...
...
@@ -14,7 +14,7 @@ func main() {
parse2
:=
add
.
Format
(
"2006"
)
fmt
.
Println
(
parse
)
fmt
.
Println
(
parse2
)
launch
.
Spider_
leagueSeason
(
)
launch
.
Spider_
match_his
(
"2019"
)
launch
.
Spider_History
()
}
...
...
foot-spider/module/win007/proc/LeagueSeasonProcesser.go
浏览文件 @
15b8e356
...
...
@@ -29,16 +29,20 @@ func GetLeagueSeasonProcesser() *LeagueSeasonProcesser {
return
&
LeagueSeasonProcesser
{}
}
func
(
this
*
LeagueSeasonProcesser
)
Startup
()
{
func
(
this
*
LeagueSeasonProcesser
)
Init
()
{
//初始化参数值
this
.
leagueSeason_list
=
make
([]
*
pojo
.
LeagueSeason
,
0
)
this
.
leagueSub_list
=
make
([]
*
pojo
.
LeagueSub
,
0
)
this
.
sUrl_leagueId
=
make
(
map
[
string
]
string
)
}
func
(
this
*
LeagueSeasonProcesser
)
Startup
()
{
this
.
Init
()
//1.获取所有的联赛
leaguesList
:=
make
([]
*
pojo
.
League
,
0
)
this
.
LeagueService
.
FindAll
(
&
leaguesList
)
//2.配置要抓取的路径
newSpider
:=
spider
.
NewSpider
(
this
,
"LeagueSeasonProcesser"
)
//index := 0
...
...
@@ -84,14 +88,13 @@ func (this *LeagueSeasonProcesser) Process(p *page.Page) {
return
}
//1.处理season
leagueId
:=
this
.
sUrl_leagueId
[
request
.
Url
]
htmlParser
:=
p
.
GetHtmlParser
()
this
.
season_process
(
htmlParser
,
request
.
Url
)
this
.
season_process
(
htmlParser
,
leagueId
,
request
.
Url
)
}
func
(
this
*
LeagueSeasonProcesser
)
season_process
(
htmlParser
*
goquery
.
Document
,
url
string
)
{
leagueId
:=
this
.
sUrl_leagueId
[
url
]
func
(
this
*
LeagueSeasonProcesser
)
season_process
(
htmlParser
*
goquery
.
Document
,
leagueId
string
,
url
string
)
{
//获取赛季开始的月份
var
beginMonth
int
if
strings
.
Contains
(
url
,
"-"
)
{
...
...
foot-spider/module/win007/proc/MatchHisProcesser.go
浏览文件 @
15b8e356
...
...
@@ -88,7 +88,9 @@ func (this *MatchHisProcesser) Process(p *page.Page) {
}
//1.处理season
htmlParser
:=
p
.
GetHtmlParser
()
this
.
season_process
(
htmlParser
,
request
.
Url
)
leagueId
:=
this
.
sUrl_leagueId
[
request
.
Url
]
this
.
LeagueSeasonProcesser
.
Init
()
this
.
LeagueSeasonProcesser
.
season_process
(
htmlParser
,
leagueId
,
request
.
Url
)
//1.处理比赛
season
:=
this
.
sUrl_Season
[
request
.
Url
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录