FreshRSS / FreshRSS

A free, self-hostable news aggregator…
https://freshrss.org
GNU Affero General Public License v3.0
10.05k stars 858 forks source link

Can't add JSON feeds? #2782

Closed kevquirk closed 4 years ago

kevquirk commented 4 years ago

Hi,

Anytime I try to add a JSON feed to my FreshRSS instance, I get the following error:

 The newsfeed could not be added. Check FreshRSS logs for details. You can try force adding by appending #force_feed to the URL.

If I then add force_feed to the end of the URL, it still fails. I've tried with a could of separate JSON feeds, and both are failing. Both also pass validation on online checkers.

Checking the logs shows the following:

2020-01-21 19:18:12A feed could not be found at `https://jlelse.blog/feed.json`; the status code is `200` and content-type is `application/json` [https://jlelse.blog/feed.json]

I assume FreshRSS supports JSON?

Thanks

Frenzie commented 4 years ago

Interesting, I hadn't heard of it.

https://jsonfeed.org/

Edit:

I assume FreshRSS supports JSON?

But no, I'm afraid not. SimplePie provides the Atom/RSS parsing.

kevquirk commented 4 years ago

Ah, that will explain why it doesn’t work then. 😊

Now I’ve raised awareness that they exist, is there any chance of adding support please? I’m not a programmer, so can’t help with code, sorry.

Frenzie commented 4 years ago

Maybe, I don't really know how hard it is to hack a new parser on top of SimplePie (because cache/retrieval stuff should probably be handled through there, and it seems more of an "upstream" kind of issue even if we did write it).

Btw, there's also an RSS feed at https://jlelse.blog/index.xml

In fact the JSON feed seems to be a rather recent addition https://jlelse.blog/thoughts/2019/10/jsonfeed/

Frenzie commented 4 years ago

Looks like it's planned in SimplePie NG. See https://github.com/simplepie/simplepie-ng/issues/4 and https://github.com/simplepie/simplepie-ng/blob/76271f917a39baad32e5a3871cdb1edeb3f3bb85/src/Middleware/Json/JsonInterface.php

kevquirk commented 4 years ago

Yeah, I’m already subscribed to his RSS feed, this was just for testing. The site that raised this issue only has JSON unfortunately.

I’ve asked the owner if he can add more widely adopted standards. Hopefully he will.

marienfressinaud commented 4 years ago

This ticket is a duplicate of https://github.com/FreshRSS/FreshRSS/issues/1551, let's continue the discussion there :)

Interesting, I hadn't heard of it.

I think you forgot about it :stuck_out_tongue:

Alkarex commented 10 months ago

Implemented in https://github.com/FreshRSS/FreshRSS/pull/5662