Simple RSS parser, tested with various feeds.
See the example
folder.
Simple RSS parser for Go
License: The Unlicense
Feed: http://feeds.5by5.tv/changelog
Here, the go-rss
package fails to parse the link
tag of the channel items. It is always empty.
package main
import (
"fmt"
rss "github.com/ungerik/go-rss"
)
func main() {
feed, _ := rss.Read("http://feeds.5by5.tv/changelog")
fmt.Printf("%v\n", feed.Item[0].Link) // This is empty!
}
I guess the xml parser gets confused because there are two link
tags in that stream (snippet):
...
<item>
...
<link>http://5by5.tv/changelog/107</link>
<atom:link rel="payment" type="text/html" href="https://flattr.com/submit/auto?url=http%3A%2F%2F5by5.tv%2Fchangelog%2F107&user_id=danbenjamin"/>
</item>
...
Any idea how this could be fixed?
Perhaps you could archive this repository and refer to https://github.com/030/go-rss? I have added a link to this repository.
Archiving is possible by enabling Archive this repository Mark this repository as archived and read-only.
in the github section.
Works as intented.. but..a lot of the golang community are newbies (i am in the bandwagon too)
I understood how to use the channel given back by the Read
thanks to #2
adding a couple lines to the readme can't be so bad, altough i may complile a PR as soon as i've really grasped it
Since https://code.google.com/p/ is going to End-Of-Service, maybe consider to export go-charset to your github account?
I would like to use a stable version of this library. Would it be possible to create 1.0.0?
Currently there is only support for 1 ItemEnclosure
however Wordpress feeds can have [] ItemEnclosures
The way I solved it temporary is this way:
in the Item struct:
Enclosure []ItemEnclosure xml:"enclosure"
It works and passes the test
Thank you for this great package :)
Could you enable CI in for example travis-ci to ensure that the code get tested on every commit and could you add a build badge to the readme?
Try to parse
http://www.reddit.com/.rss
rss.Read returns empty struct with nil error.
Can this library parse atom feeds?
How to reproduce:
v , err:= rss.Read("http://www.reddit.com/.rss")
Environment:
go version go1.12.8 linux/amd64
In the README a license is mentioned. Could you add a LICENSE file as well so the license type will appear on the top right too?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.