Answer the question
In order to leave comments, you need to log in
Why can't parse RSS?
Tried to write an RSS parser. At first I decided to take a ready-made module . But such code did not want to work in any way, nil was constantly returned:
package main
import "github.com/SlyMarbo/rss"
func main() {
feed, err := rss.Fetch("https://habrahabr.ru/rss/hubs/all/")
if err != nil {
// handle error.
}
}
package main
import "net/http"
func main() {
feed, err := http.Get("https://habrahabr.ru/rss/hubs/all/")
if err != nil {
fmt.Println(feed)
} else {
fmt.Println(err)
}
defer feed.Body.Close()
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question