fossar / selfoss

multipurpose rss reader, live stream, mashup, aggregation web application
https://selfoss.aditu.de
GNU General Public License v3.0
2.38k stars 345 forks source link

Replace News spouts with FullTextRss #935

Open jtojnar opened 7 years ago

jtojnar commented 7 years ago

I am not sure anyone even uses these spouts – Teltarif spout leaves some JavaScript fragments in the text, some Heise categories only show lead paragraph and MMOspy spout does not even work.

Lightreading needs FTR filter file, but other can be migrated right away. Since Lightreading, Teltarif and MMOspy do not contain any parameters, they can be hard-migrated to RSS (with FullTextRSS) without any problem.

Golem, Heise and Prolinux allow users to choose a category so if someone uses them, the classes could be changed to extend spouts\rss\fulltextrss instead spouts\rss\feed, reducing the maintenance requirements. But if no-one uses them, hard-migration would clean the spout list a bit.

Edit: Clarified Heise showing only lead paragraph, it only happens in some categories.

gerundt commented 7 years ago

Mhh, I use Heise (with Hauptseite) and Golem (with ALL) and have no problems. Sometimes some HTML fragments from the JS Gallery at Golem, but nothing what really is anoning. ;)

jtojnar commented 7 years ago

@gerundt Good to know someone actually uses some of them.

As you note, some of the spouts still work, for most of them, however, FullTextRss actually works better. (I tried Heise Technology Review, Hauptsite indeed displays whole body correctly.) And since the news spouts actually have the same goal as FullTextRss, it makes sense to use FTR directly. Some of the regex replacements are quite crazy and this would tidy the code significantly. See the “Change Teltarif and MMOspy spouts to use FullTextRSS” commit mentioned above.

Except for, Lightreading, which lacks a FTR site config because the source code is a clusterfork to parse, the spouts can be changed to use FullTextRss transparently to the user. The replacement, as it was made in the linked commit, is therefore a non issue. I am more interested in the hard-replacement, i.e. a migration that would change the spout type to RSS (with FTR) in the database. It would require users to know the URL like any other RSS feed when adding them, though it could be improved with #938.

gerundt commented 7 years ago

@jtojnar I wanted to give FullTextRSS a try with my selfoss 2.71 Installation, but the feed are still empty.

The log file say something about a missing class: selfoss.ERROR: Class 'Readability' not found {"exception":"[object] (Error(code: 0): Class 'Readability' not found at /www/htdocs/feedreader/libs/fulltextrss/content-extractor/ContentExtractor.php:203) ... }

So currently it is no alternative for me.

jtojnar commented 7 years ago

FullTextRss support is indeed broken in 2.17 (#895)

jtojnar commented 7 years ago

I have soft-converted mmospy, teltarif and prolinux in #936 since FTR actually works better for them. Eventually, the rest of the spouts should be converted and hard-conversion should be considered.