Idea - exclude certain CSS elements from page
Excellent programme - I use it all the time to pull full web pages using CSS selector. However, sometimes in the page there are elements I don't want to see, such as newsletter sign-up boxes, 'Most read' etc, and these have their own CSS selector which is consistent within the page. Is it possible to list elements which I don't want shown and for those elements to be dumped.
In the screenshot I've put a red box around two areas, the top one is an email signup form, the bottom one is 'related articles' - both of these appear in every article, and are both inside the article body.

@dddddddavid you can leverage the customCSS extension to do that.
Are there any working examples of rules to accomplish this with the customCSS extension? I have tried with the format .skinny-signup div{display: none;} but without any luck.
Can you provide the feed you want to alter?
https://www.liverpoolecho.co.uk/news/?service=rss
The CSS selector I am using is .content-column
and the additional CSS rules I have tried with the extension are: .skinny-signup div{display: none;} .embedded-image-grid div{display: none;}
I'd probably use something like:
div[data-feed="166"] .other-selectors
To make sure it won't affect stuff you don't want affected. That 166 is just whatever ID the feed has.
Where did you get that .skinny-signup thing from? You should right-click on the element in FreshRSS to see what's going on with it.
I tried to do the full content thing with .content-column on that feed above but it doesn't seem to be working for me.
The .skinny-signup is the 'signup for our newsletter' thing which is on all Trinity Mirror sites.
Still can't manage it
Okay, it worked on my VPS with the latest release. Not sure if there's something wrong with my local Docker dev instance on my laptop (e.g. insufficient memory or timeout) or with current master.
Anyway, it doesn't look like those class names are taken along. That's probably a conscious decision in the code somewhere. I think I've previously expressed I'd like them to be included with a relevant prefix (like the feed ID) for exactly this reason.
You can still do it with some minor difficulty. The key in any case is to look in FreshRSS, because by that point you're not dealing with the original site.
div[data-feed="243"] div[itemprop="articleBody"] span:first-child,
div[data-feed="243"] div[itemprop="articleBody"] span:first-child+div
{ display: none }
This solution would only work with reading articles within the FreshRSS web app?
A feature I would love is the ability to remove CSS elements from an article that also works with external feed readers as per the 'Article CSS selector' feature.
For example, in the subscription management interface:
Article CSS selector: [ .article ]
Remove CSS elements: [ .ads, .share-widget ]
Often there are social share widgets, banners etc. in the article that are messy and also interfere with how the article image previews work in external feed readers like Reeder.
A feature I would love is the ability to remove CSS elements from an article that also works with external feed readers as per the 'Article CSS selector' feature.
Yes, that would be awesome! Using the extension doesn't work with external readers and was a real pain to set up (at least for me)...
Wouldn't it possible to achieve that using :not() ? : https://developer.mozilla.org/en-US/docs/Web/CSS/:not
I tried without success
I've had some success with listing multiple selectors e.g. .c-entry-hero figure, .c-entry-summary, .l-col__main figure, .c-entry-content for https://www.theverge.com/rss/index.xml
Removing elements would be very useful as a feature, though.
I'm not sure how this could be done with a plugin - can you add to a configuration page, such as subscriptions? Or would you need to replace the whole thing?
You would probably use the entry_before_insert hook but the HTML source is 'sanitized' beforehand so there would need to be some changes to Entry.php and it would likely be better as a built-in feature:
$content->find($SELECTORSTOREMOVE)->remove();
$html = trim($content->__toString());
This has not been talked about in a while, so I am dropping my comment here to support the implementation of this feature.
Excluding the "Related articles" and other annoying sections would be great.
For all intents and purposes implemented in #4220.
For all intents and purposes implemented in #4220.
It's for 1.20 right? Not in any current release? I'll wait for now :P
https://github.com/FreshRSS/FreshRSS/pull/4501
Implemented. Tests and feedback welcome