VOA Learning English
This commit is contained in:
parent
3c18e81205
commit
93fd4d4a2e
17
main.go
17
main.go
@ -81,16 +81,23 @@ func theNewYorker(w http.ResponseWriter, r *http.Request) {
|
|||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func voaLearnEnglish(w http.ResponseWriter, r *http.Request) {
|
||||||
|
io.WriteString(w, fetch("https://feedx.best/rss/voalearningenglish.xml", func(s string) string {
|
||||||
|
return filterItem(s, time.Now().Day(), 1)
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
port := os.Getenv("port")
|
port := os.Getenv("port")
|
||||||
if port == "" {
|
if port == "" {
|
||||||
port = ":80"
|
port = ":80"
|
||||||
}
|
}
|
||||||
time.Local = time.FixedZone("CST", 3600*8)
|
time.Local = time.FixedZone("CST", 3600*8)
|
||||||
http.HandleFunc("/pentitugua", penti) //喷嚏图挂
|
http.HandleFunc("/pentitugua", penti) //喷嚏图挂
|
||||||
http.HandleFunc("/zhihuDaily", zhihuDaily) //知乎日报
|
http.HandleFunc("/zhihuDaily", zhihuDaily) //知乎日报
|
||||||
http.HandleFunc("/tjxz", tjxz) //田间小站
|
http.HandleFunc("/tjxz", tjxz) //田间小站
|
||||||
http.HandleFunc("/bbcLearn", bbcLearn) //bbc 英语学习
|
http.HandleFunc("/bbcLearn", bbcLearn) //bbc 英语学习
|
||||||
http.HandleFunc("/theNewYorker", theNewYorker) //纽约客
|
http.HandleFunc("/theNewYorker", theNewYorker) //纽约客
|
||||||
|
http.HandleFunc("/voaLearnEnglish", voaLearnEnglish) //VOA Learning English
|
||||||
log.Fatal(http.ListenAndServe(port, nil))
|
log.Fatal(http.ListenAndServe(port, nil))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user