Comments (8)
What do you mean? Which classes do you want to clean and why?
from readability.php.
I mean this method
readability.php/src/Readability.php
Line 1539 in 992a112
wich appeared after the last release. It clears original css-classes.
I suggest to introduce new config option and check it here
readability.php/src/Readability.php
Line 1603 in 992a112
// by default can be set to true
if ($this->configuration->getCleanClasses()) {
$this->_cleanClasses($article);
}
from readability.php.
Alright, now I get you. What would be the purpose of making this optional? I think the library's ultimate functionality is to return the cleanest text possible. Why'd you want to keep the original classes which would point to inexistent styles?
from readability.php.
Sometimes the result may be unsatisfactory, and I rely on these classes when post-processing the result.
I can create some rules for thΡ concrete url-sources, relying on css classes and ids of the original html.
from readability.php.
I clean out these classes myself, in any case, but a little later, after processing additional rules.
from readability.php.
Mmmm, I understand. Can you provide an example for an "unsatisfactoy result"? As I always answered to this type of requests, I prefer to create a more intelligent algorithm rather than giving the user a framework to tweak the functionality.
from readability.php.
Yeah. I'll do it some later.
Maybe it will be betted to submit a failing test case )
But this config option will not interfere in any way - it will give more flexibility )
from readability.php.
I get what you mean, but this kind of changes allows everyone to request something to tweak the intended functionality. Thanks for understanding. Will wait for your failing test case :)
from readability.php.
Related Issues (20)
- "Malware automatically quarantined" [/nextcloud/apps/news/vendor/....(readability)...] HOT 1
- Is there a way to rating to title meta tag more than og:title meta tag? HOT 1
- Using a different parser for HTML, and a few other small issues HOT 5
- Strip all images from text HOT 1
- iterator_to_array() error HOT 6
- HTML infiltrating in imported content HOT 3
- Add custom tag to be included in the text HOT 3
- 'installation' error HOT 2
- Type error: Argument 1 passed to iterator_to_array() must implement interface Traversable, null given in vendor/andreskrey/readability.php/src/Readability.php (line 1274) HOT 2
- First paragraph of many articles omitted HOT 1
- Fatal error HOT 1
- PHP Fatal error: Uncaught TypeError: Argument 1 passed to iterator_to_array() must implement interface Traversable, null given HOT 23
- Trying to get property 'nodeName' of non-object HOT 4
- Images problems HOT 3
- Equal parts of article HOT 2
- Parsing never ends + lot of PHP Notice HOT 2
- can get the published date of page
- Readability plugin as used in tt-rss has quote escape problem on nytimes.com HOT 4
- PHP 8 compatibility HOT 2
- php7.4 - usort() needs int, not bool HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from readability.php.