Page 1 of 1

Heise Newsticker

Posted: 05 Jun 2016, 11:12
by bornheim
Hi,

Heise offers their newsticker with two feeds:
http://www.heise.de/newsticker/heise.rdf
http://www.heise.de/newsticker/heise-atom.xml

I used the former one successfully until April 13th, after that day no new articles came through. Yesterday I investigated and switched to the latter. Happy for now.

But of course I would like to know whats wrong with the former. https://fakecake.org/myfeedsucks/ says "Parsed successfully", but finds no articles.

bornheim

Re: Heise Newsticker

Posted: 07 Jun 2016, 12:40
by darknite323
I highly doubt that TTRSS support RDF, that first link isn't a proper news feed, at least nothing like RSS or ATOM.

It's missing time and date and a bunch of other stuff TTRSS probably depends on.
Looking at the site before the 13th shows that the first address actually redirects to a RSS feed.
https://web.archive.org/web/*/http://www.heise.de/newsticker/heise.rdf

Choose a date before the 13th (I did the 10th) and you can see that the feed looks different, actually has date/times and a bunch of other information if you open it in a text editor, that info is now missing.

Problem is with the website changing, nothing wrong with TTRSS as far as I can see.

fox can correct me if im wrong :)

Re: Heise Newsticker

Posted: 07 Jun 2016, 13:03
by fox
technically there is support for RDF in the parser but i'm not sure if its working properly (i guess not) or the feed i was testing back then was different somehow

Re: Heise Newsticker

Posted: 07 Jun 2016, 13:29
by fox
to elaborate, while there is RDF support with the parser, there are some oddities with how RDF works with Xpath, as far as I know those two things are not entirely compatible because RDF is a bit of a special retarded snowflake variant of XML. feel free to correct me if i'm wrong.

anyway, tt-rss parser needs Xpath, so to make it fit, it uses a hack (it binds a fake namespace which makes the queries work for some reason that I don't remember anymore) which doesn't work with this particular RDF most likely because it binds a default namespace (see the unprefixed xmlns="..." in the root element) which screws up the queries.

the bottomline here is that RDF has been dead for years now, at least as far as news feeds go, so i'm not sure if screwing around with the parser to make it work on this feed while possibly breaking the other previously supported ones is worth the effort.

in this particular case they do provide an atom feed which should be working so just use that instead.

Re: Heise Newsticker

Posted: 07 Jun 2016, 13:34
by fox
to elaborate a bit more, the example feed i was using i got here: http://web.resource.org/rss/1.0/spec#s7

if someone can figure out why this one works and heise one doesn't with php/xpath then feel free to post ideas.

Re: Heise Newsticker

Posted: 07 Jun 2016, 15:41
by feader
fox wrote:to elaborate a bit more, the example feed i was using i got here: http://web.resource.org/rss/1.0/spec#s7

if someone can figure out why this one works and heise one doesn't with php/xpath then feel free to post ideas.

Different default namespaces. heise uses xmlns="http://my.netscape.com/rdf/simple/0.9/", and the spec (and the feedparser class for the rssfake prefix) uses xmlns="http://purl.org/rss/1.0/", hence the xpath query doesn't return anything for heise.

If anyone cares: For some reason, wordpress.com still rolls out rdf feeds, which one can get with the feed/rdf path, i.e. https://iconicphotos.wordpress.com/feed/rdf/. These get parsed properly by ttrss because they also use the purl.org/rss/1.0 namespace.

So maybe there exist two different rdf standards then. But since it's dead, that shouldn't bother anyone too much.

Re: Heise Newsticker

Posted: 08 Jun 2016, 18:26
by fox
yeah i don't think wasting time on implementing this rdf 0.9 or w/e is worth the effort

Re: Heise Newsticker

Posted: 20 Jun 2016, 12:19
by feader
Final remark on this: Maybe an error message would be better than a message that the feed got parsed, but has neither articles nor a title. The DOMNode class has a isDefaultNamespace method which could be used in the rdf part of FeedParser to check if http://purl.org/rss/1.0/ is the default namespace and proceed as usual, and if not, produce an error message.

Re: Heise Newsticker

Posted: 20 Jun 2016, 13:08
by fox
well if someone wants to bother, i can merge this