Skip to content

Commit

Permalink
cna fetch range committed.
Browse files Browse the repository at this point in the history
  • Loading branch information
wedojava committed Sep 29, 2020
1 parent 6c28284 commit 7f1db2e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions internal/fetcher/sites/cna/cna.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ func setTitle(p *Post) error {
}
title := n[0].FirstChild.Data
if strings.Contains(title, "| 娛樂 |") ||
strings.Contains(title, "| 政治 |") ||
strings.Contains(title, "| 兩岸 |") ||
strings.Contains(title, "| 運動 |") ||
strings.Contains(title, "| 文化 |") ||
strings.Contains(title, "| 地方 |") ||
Expand Down
5 changes: 3 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ import (
func main() {
year := strconv.Itoa(time.Now().Year())
sites := []string{
"https://www.cna.com.tw/list/aall.aspx",
"https://news.ltn.com.tw/list/breakingnews/world",
// expand fetch range need update cna.go function: setTitle
"https://www.cna.com.tw/list/aopl.aspx", // 国际
"https://news.ltn.com.tw/list/breakingnews/world", // 国际
"https://www.zaobao.com/realtime/world",
"https://www.zaobao.com/news/world",
"https://www.zaobao.com/realtime/china",
Expand Down

0 comments on commit 7f1db2e

Please # to comment.