From 93fd4d4a2eb368fb40b7429a2217181b52801f83 Mon Sep 17 00:00:00 2001 From: xing Date: Fri, 14 Apr 2023 14:02:35 +0800 Subject: [PATCH] VOA Learning English --- main.go | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index bbe214e..fabcfb5 100644 --- a/main.go +++ b/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() { port := os.Getenv("port") if port == "" { port = ":80" } time.Local = time.FixedZone("CST", 3600*8) - http.HandleFunc("/pentitugua", penti) //喷嚏图挂 - http.HandleFunc("/zhihuDaily", zhihuDaily) //知乎日报 - http.HandleFunc("/tjxz", tjxz) //田间小站 - http.HandleFunc("/bbcLearn", bbcLearn) //bbc 英语学习 - http.HandleFunc("/theNewYorker", theNewYorker) //纽约客 + http.HandleFunc("/pentitugua", penti) //喷嚏图挂 + http.HandleFunc("/zhihuDaily", zhihuDaily) //知乎日报 + http.HandleFunc("/tjxz", tjxz) //田间小站 + http.HandleFunc("/bbcLearn", bbcLearn) //bbc 英语学习 + http.HandleFunc("/theNewYorker", theNewYorker) //纽约客 + http.HandleFunc("/voaLearnEnglish", voaLearnEnglish) //VOA Learning English log.Fatal(http.ListenAndServe(port, nil)) }