diff options
author | Runxi Yu <me@runxiyu.org> | 2024-10-02 17:06:55 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2024-10-02 17:06:55 +0800 |
commit | f4483729eed98be55520baa85c5d23bc53a5e283 (patch) | |
tree | 57a1503c124422b11a629aa84229d0ad777fa9e3 | |
parent | Check errors and simplify (diff) | |
download | rssmail-master.tar.gz rssmail-master.zip |
-rw-r--r-- | main.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -40,6 +40,10 @@ func main() { last_time := time.Unix(last_int64, 0) fp := gofeed.NewParser() feed, _ := fp.ParseURL(rss_url) + if feed.Items == nil { + fmt.Fprintf(os.Stderr, "no feed items???\n") + return + } for i := len(feed.Items) - 1; i >= 0; i-- { item := feed.Items[i] title := html2text.HTML2Text(item.Title) |