fbrss feed not working.

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
Cheetah
Bear Rating Trainee
Bear Rating Trainee
Posts: 18
Joined: 13 Mar 2013, 21:18

Re: fbrss feed not working.

Postby Cheetah » 15 Mar 2013, 17:49

Hmm, good question, wasn't sure how fast xmllint was, worth finding out :)

I rummaged through my feeds, looking for the biggest one (by bytes), and without an exhuastive search, the largest ones I found were Ars Technica, at ~120k, and a coding blog at ~290k.

I downloaded each feed with wget, and then ran several passes of "time xmllint --recover foo.rss > foo.lint.rss" on each. The worst case time for either one was ~100ms, the best case < 10ms. The runtimes seemed to be about the same in each case. Since my module doesn't write the linted content out to disk, I did another set of runs sending the output to /dev/null instead of a file. In that case, every run was under 10ms. Granted I'm running this on a quite fast machine (i7-970: 6 cores @ 3.2GHz), but even if it took 100ms for each feed, it wouldn't be terrible.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: fbrss feed not working.

Postby fox » 15 Mar 2013, 17:58

Yeah, this sounds okay to me.

User avatar
DrMcCoy
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 16 Mar 2013, 13:44
Location: Braunschweig, Germany
Contact:

Re: fbrss feed not working.

Postby DrMcCoy » 16 Mar 2013, 13:49

Cheetah wrote:http://dl.dropbox.com/u/72924289/ff_xmllint_init.php

Unfortunately, for me, that one only seems to be working for the fetch after subscribing to a feed. Every further update afterwards is again broken with the same error message as before. I'm using the forking update_daemon2, if that makes any difference.

User avatar
auggy
Bear Rating Trainee
Bear Rating Trainee
Posts: 14
Joined: 16 Mar 2013, 21:17

Re: fbrss feed not working.

Postby auggy » 16 Mar 2013, 21:22

I would love to try this plug-in but don't know where to start.

User avatar
auggy
Bear Rating Trainee
Bear Rating Trainee
Posts: 14
Joined: 16 Mar 2013, 21:17

Re: fbrss feed not working.

Postby auggy » 16 Mar 2013, 21:30

miceliux wrote:
Cheetah wrote:I hit a similar problem, and was motivated to fix it.

I wrote a tiny plugin for tt-rss that will pass feed data through xmllint --recover as Usul suggested.

http://dl.dropbox.com/u/72924289/ff_xmllint_init.php


Thank you.
How do I install it? I have tried to put it in ./plugins/xmllint/init.php and other variations, but it doesn't appear in the plugins list.



I put it in /rss/plugins/ff_xmllint and named it init.php and i showed up on my list.

m0zes
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 17 Mar 2013, 00:46

Re: fbrss feed not working.

Postby m0zes » 17 Mar 2013, 00:49

I had to put the full path to xmllint in the ./plugins/ff_xmllint/init.php file for it to work, but once I did it is working like magic.

User avatar
raindog469
Bear Rating Trainee
Bear Rating Trainee
Posts: 17
Joined: 17 Mar 2013, 22:35

Re: fbrss feed not working.

Postby raindog469 » 18 Mar 2013, 03:06

I just got it to work by removing the fourth parameter (false) from line 9 and the comma on line 8 from the about() function return value. I also named it plugins/ff_xmllint/init.php but I don't know if that made a difference.

I also just daemonized update.php and it hasn't pulled any of my feeds (or written anything to my log) yet, so I don't know yet whether ff_xmllint makes a difference. It might even be breaking the update. But it does show up in my plugin list and I enabled it.

User avatar
raindog469
Bear Rating Trainee
Bear Rating Trainee
Posts: 17
Joined: 17 Mar 2013, 22:35

Re: fbrss feed not working.

Postby raindog469 » 18 Mar 2013, 03:42

phpbb took away my edit button. I was coming back to say that it's not working for me... feeds with xml parsing errors still have errors.

I went back to my pre-Google-Reader strategy, using a trivial perl CGI on one of my own servers as a proxy to strip out invalid characters on just the problem feeds. That did work and should cause less of a performance hit overall. (Source code follows.)

Code: Select all

#!/usr/bin/perl

use CGI qw(:standard);
my $url = param("feed");

die "Bad URL" unless $url =~ /^https?:/i;

open WGET, "-|", "wget", "-O-", $url or die $!;
my $feed = join('', <WGET>);

$feed =~ s/[^\x0a-\x7e]/ /g;
1 while $feed =~ s/(href="[^\"]+)\s([^\"]*)"/$1%20$2/ig;
$feed =~ s/&/&amp;/g;
$feed =~ s/&amp;amp;/&amp;/g;

print header("application/rss+xml");
print $feed;
exit 0;

Cheetah
Bear Rating Trainee
Bear Rating Trainee
Posts: 18
Joined: 13 Mar 2013, 21:18

Re: fbrss feed not working.

Postby Cheetah » 18 Mar 2013, 18:07

raindog469 wrote:I just got it to work by removing the fourth parameter (false) from line 9 and the comma on line 8 from the about() function return value. I also named it plugins/ff_xmllint/init.php but I don't know if that made a difference.

Hmm, I wonder if this was actually necessary, and if so, why?

I'm using 1.7.2 at the moment, I don't know if that might be part of it?

Cheetah
Bear Rating Trainee
Bear Rating Trainee
Posts: 18
Joined: 13 Mar 2013, 21:18

Re: fbrss feed not working.

Postby Cheetah » 18 Mar 2013, 18:08

m0zes wrote:I had to put the full path to xmllint in the ./plugins/ff_xmllint/init.php file for it to work, but once I did it is working like magic.

Is xmllint not in your path, or is your webserver setup funny?

wreckedred
Bear Rating Trainee
Bear Rating Trainee
Posts: 6
Joined: 17 Mar 2013, 18:54

Re: fbrss feed not working.

Postby wreckedred » 19 Mar 2013, 19:48

Usul - thank you.

curl -s "http://example.com/badfeed.xml" | xmllint --recover - > /var/www/feeds/goodfeed.xml

worked great for the error I was receiving:

This XML document is invalid, likely due to invalid characters. XML error: Not well-formed (invalid token) at line 1, column 1

I simply put your command into a bash script, because I have several feeds with errors, and run in through cron and subscribed to goodfeed.xml

cverbiest
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 05 May 2013, 19:36

Re: fbrss feed not working.

Postby cverbiest » 05 May 2013, 20:10

I switched from greader to tt-rrs and found that several feeds, with which greader had no issue, no longer worker due to xml errors.

I copied ff_xmllint_init.php to /opt/ttrss/plugins/ff_xmllint/init.php and made init.php executable (not sure if that's required).
After a refresh it appears on the plugin list.
It fixed http://feeds.feedburner.com/oreilly/radar/atom and several other for me, great !

User avatar
recognitium
Bear Rating Trainee
Bear Rating Trainee
Posts: 14
Joined: 02 Jul 2013, 01:35

Re: fbrss feed not working.

Postby recognitium » 02 Jul 2013, 17:39

I tried to use ff_xmllint_init.php with the instructions above, but couldn't make it work yet.

I get this message in System Log:

"Plugin ff_xmllint is not compatible with current API version (need: 2, got: 1)"


--- EDIT ---

Thank you, guys. Sorry for the useless post. I was too narrow focused on xmllint instead of trying the clear and obvious search on the error.
Last edited by recognitium on 03 Jul 2013, 02:55, edited 2 times in total.

7duck
Bear Rating Trainee
Bear Rating Trainee
Posts: 47
Joined: 08 Jun 2013, 08:11

Re: fbrss feed not working.

Postby 7duck » 02 Jul 2013, 19:27

recognitium wrote:I get this message in System Log:
"Plugin ff_xmllint is not compatible with current API version (need: 2, got: 1)"

Did anybody update/patch the plugin?


Try editing the init.php file and adding this:

Code: Select all

..


CORRECTION: Sir, your answer lies HERE
Last edited by 7duck on 02 Jul 2013, 23:21, edited 1 time in total.

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: fbrss feed not working.

Postby sleeper_service » 02 Jul 2013, 22:04

recognitium wrote:I tried to use ff_xmllint_init.php with the instructions above, but couldn't make it work yet.

I get this message in System Log:

"Plugin ff_xmllint is not compatible with current API version (need: 2, got: 1)"


Did anybody update/patch the plugin?

search before posting, the answer on how to fix that is in the forums.


Return to “Support”

Who is online

Users browsing this forum: No registered users and 14 guests