Help with filters

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Help with filters

Postby fox » 09 Sep 2015, 10:15

unfortunately i'm not capable of remote viewing and telepathy so no although i'm reasonably certain it involves user error, much like all questions about purging not working. i have corrected your (wrong) guess about filter rules, that's all.

in the nutshell filters involve matching article data using a builtin php function with a user-supplied regular expression. you can't really go wrong here unless the user fucks up somehow.

also, if you would search before posting, you'd know that filter preview is not 100% accurate and never will be, how to debug filters and updating correctly, how to provide necessary data before posting, it's all here on the forums. what you're doing wrong is basically your posting so far.

SimbaLion
Bear Rating Trainee
Bear Rating Trainee
Posts: 21
Joined: 07 Jul 2015, 02:04

Re: Help with filters

Postby SimbaLion » 09 Sep 2015, 20:22

Well I think you're wrong, frankly. I created a filter today using long strings, about 30-40 characters or less. When I had 16 rules the filter would fail tests, and when I reduced it to 10 rules the filter passed. There was no punctuation, only alphanumerics and spaces.

Then I took the 6 strings I removed and created a new filter with those, and that also passed the test, so this looks like an issue of length.

I have searched the forum, I searched it when I first ran into this problem a long time ago. I'm familiar with the limitations of the test function. Does ttrss log errors somewhere? Perhaps it would be helpful if instead of "an error has occured" it would provide details about the error.

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

Re: Help with filters

Postby fox » 09 Sep 2015, 20:57

w/e is shown in filter test means nothing in practice, stuff that actually gets applied you can see in the feed debugger

like i said it's all on the forums

e: it's pretty obvious that if you keep adding rules indefinitely you will run into POST query limits as set by your http server (so you won't be able to save or test the filter). this has nothing to do with tt-rss however, if you manage to increase the limits it will keep on trucking.

JustAMacUser
Bear Rating Overlord
Bear Rating Overlord
Posts: 373
Joined: 20 Aug 2013, 23:13

Re: Help with filters

Postby JustAMacUser » 09 Sep 2015, 21:00

Would you be willing to post a screenshot of the complete filter that's failing with an error?

Also, check and post your PHP error log's relevant entry after the error occurs.

fox is not wrong about the number of rules. The code just does a foreach loop for each rule so quantity is kind of irrelevant. It is more likely there's a small error in the regex syntax.

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

Re: Help with filters

Postby fox » 09 Sep 2015, 21:03

yeah the lack of concrete info in this thread borders on pathological, no logs, no nothing, just words

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

Re: Help with filters

Postby fox » 09 Sep 2015, 22:10

heads up, filter test dialog is hopefully less useless now

SimbaLion
Bear Rating Trainee
Bear Rating Trainee
Posts: 21
Joined: 07 Jul 2015, 02:04

Re: Help with filters

Postby SimbaLion » 10 Sep 2015, 00:51

So I tried using the feed debugger but got this:

[21:48:20/30840] start
[21:48:20/30840] local cache will not be used for this feed
[21:48:20/30840] fetching [http://chicago.craigslist.org/search/cpg?format=rss]...
[21:48:20/30840] If-Modified-Since: Wed, 09 Sep 2015 16:41:00 GMT
[21:48:35/30840] fetch done.
[21:48:35/30840] unable to fetch: 28 Operation timed out after 15000 milliseconds with 3783 out of 5712 bytes received []


Here is the text of spam posts I'm trying to filter out:

Currently in need of a Wordpress designer with the relevant experience in html, css coding as well as javascript. Must be familiar with coding existing sites or building sites from the ground up. Experience with bootstrap is a big plus. Also experience with designing front end is needed for this position. Please have an existing portfolio as we would need to take a look at some of your previous work to determine if you are the right fit for us. Client references would be very helpful in helping us to decide if you are the right fit. This position pays between $2500-$3000 per month. Bonus included after 3 month probation period. Get in touch:freelancegigs.work

And the filter rule is:
freelancegigs


There are others, but they're all basically the same kind of posts and the same sort of problem. What I'd really like to do is group them together with a search like (freelancegigs|somescammer|somefraud|somespammer|etcetcetc)

I appreciate you taking time to try and help with this.

Latimer
Bear Rating Master
Bear Rating Master
Posts: 131
Joined: 17 Mar 2013, 19:35

Re: Help with filters

Postby Latimer » 10 Sep 2015, 02:10

It's a stupidly obvious thing to point out, but, unless you're doing a full post fetch somewhere, I doubt you ever see in your reader the part of the post that contains the word you're trying to use in your filter.

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

Re: Help with filters

Postby fox » 10 Sep 2015, 09:41

>So I tried using the feed debugger but got this:

it's hard to overstate the amount of effort thats going on here

got a timeout welp time to post some more random stuff on the forum

maybe try the debugger again? nah

rcaputo
Bear Rating Trainee
Bear Rating Trainee
Posts: 6
Joined: 22 Feb 2016, 06:14

Re: Help with filters

Postby rcaputo » 27 Feb 2016, 23:49

JustAMacUser wrote:Just in case there's confusion, while your browser will translate HTML entities into their respective characters, preg_* has no understanding of such. So if the source is using the character code, or named entity, or actual character; they will all be different for preg_match and you'll have to build your pattern to account for all of the variations.


This answer helped me today.


Return to “Support”

Who is online

Users browsing this forum: No registered users and 6 guests