VOA Learning English
This commit is contained in:
parent
3c18e81205
commit
93fd4d4a2e
7
main.go
7
main.go
@ -81,6 +81,12 @@ 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 == "" {
|
||||||
@ -92,5 +98,6 @@ func main() {
|
|||||||
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