diff options
-rw-r--r-- | AUTHORS.md | 4 | ||||
-rw-r--r-- | composer.json | 2 | ||||
-rw-r--r-- | composer.lock | 327 | ||||
-rw-r--r-- | lib/Scraper/Scraper.php | 6 |
4 files changed, 322 insertions, 17 deletions
diff --git a/AUTHORS.md b/AUTHORS.md index 558fc8e49..42fe73777 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -40,6 +40,7 @@ * [Daniel Opitz](mailto:danopz@users.noreply.github.com) * [Daniel Rheinbay](mailto:danielrheinbay@gmail.com) * [Lars Bensmann](mailto:lars@almosthappy.de) +* [Rhys Tyers](mailto:mail@rhy.si) * [Robin Appelman](mailto:robin@icewind.nl) * [bluehaze](mailto:francesco.sportolari@gmail.com) * [darkside40](mailto:darkside401@googlemail.com) @@ -185,6 +186,9 @@ * [nextcloud486153](mailto:78801830+nextcloud486153@users.noreply.github.com) * [nexus-uw](mailto:you@example.com) * [repat](mailto:repat@repat.de) +* [rhein](mailto:mail@ralfhein.de) +* [rhyst](mailto:5313660+rhyst@users.noreply.github.com) +* [rhyst](mailto:rhystyers1@gmail.com) * [ritchiewilson](mailto:rawilson52@gmail.com) * [skiingwiz](mailto:skiingwiz@gmail.com) * [sonologic](mailto:gmc@sonologic.nl) diff --git a/composer.json b/composer.json index e8656e1b8..7953b9fc6 100644 --- a/composer.json +++ b/composer.json @@ -46,7 +46,7 @@ "riimu/kit-pathjoin": "^1.2.0", "debril/feed-io": "^v4.9.12", "arthurhoaro/favicon": "^1.3.3", - "fivefilters/readability.php": "^2.1", + "fivefilters/readability.php": "^3.1", "ext-json": "*", "ext-simplexml": "*", "ext-libxml": "*", diff --git a/composer.lock b/composer.lock index cdc18db30..74fbff258 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "1d2a8d2139b649bccffc321665a9b3ac", + "content-hash": "595be27e5579efc0421b0f368730f696", "packages": [ { "name": "arthurhoaro/favicon", @@ -200,28 +200,30 @@ }, { "name": "fivefilters/readability.php", - "version": "v2.1.0", + "version": "v3.1.0", "source": { "type": "git", "url": "https://github.com/fivefilters/readability.php.git", - "reference": "7617a912b6c527909168f5d41d263792f171c42a" + "reference": "760d9e3039be865d4fd79598473ecf545ecc9a4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fivefilters/readability.php/zipball/7617a912b6c527909168f5d41d263792f171c42a", - "reference": "7617a912b6c527909168f5d41d263792f171c42a", + "url": "https://api.github.com/repos/fivefilters/readability.php/zipball/760d9e3039be865d4fd79598473ecf545ecc9a4e", + "reference": "760d9e3039be865d4fd79598473ecf545ecc9a4e", "shasum": "" }, "require": { "ext-dom": "*", "ext-mbstring": "*", "ext-xml": "*", - "php": ">=7.0.0", + "league/uri": "~6.7.2", + "masterminds/html5": "^2.0", + "php": ">=7.4.0", "psr/log": "^1.0" }, "require-dev": { - "monolog/monolog": "^1.24", - "phpunit/phpunit": "^6.5" + "monolog/monolog": "^2.3", + "phpunit/phpunit": "^9" }, "suggest": { "monolog/monolog": "Allow logging debug information" @@ -229,7 +231,7 @@ "type": "library", "autoload": { "psr-4": { - "andreskrey\\Readability\\": "src/" + "fivefilters\\Readability\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -240,19 +242,265 @@ { "name": "Andres Rey", "email": "andreskrey@gmail.com", - "role": "Lead Developer" + "role": "Original Developer" + }, + { + "name": "Keyvan Minoukadeh", + "email": "keyvan@fivefilters.org", + "homepage": "https://www.fivefilters.org", + "role": "Developer/Maintainer" } ], "description": "A PHP port of Readability.js", - "homepage": "https://github.com/andreskrey/readability", + "homepage": "https://github.com/fivefilters/readability.php", "keywords": [ "html", "readability" ], "support": { - "source": "https://github.com/fivefilters/readability.php/tree/v2.1.0" + "issues": "https://github.com/fivefilters/readability.php/issues", + "source": "https://github.com/fivefilters/readability.php/tree/v3.1.0" + }, + "time": "2022-11-17T02:34:52+00:00" + }, + { + "name": "league/uri", + "version": "6.7.2", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri.git", + "reference": "d3b50812dd51f3fbf176344cc2981db03d10fe06" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/d3b50812dd51f3fbf176344cc2981db03d10fe06", + "reference": "d3b50812dd51f3fbf176344cc2981db03d10fe06", + "shasum": "" + }, + "require": { + "ext-json": "*", + "league/uri-interfaces": "^2.3", + "php": "^7.4 || ^8.0", + "psr/http-message": "^1.0" + }, + "conflict": { + "league/uri-schemes": "^1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^v3.3.2", + "nyholm/psr7": "^1.5", + "php-http/psr7-integration-tests": "^1.1", + "phpstan/phpstan": "^1.2.0", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/phpstan-phpunit": "^1.0.0", + "phpstan/phpstan-strict-rules": "^1.1.0", + "phpunit/phpunit": "^9.5.10", + "psr/http-factory": "^1.0" + }, + "suggest": { + "ext-fileinfo": "Needed to create Data URI from a filepath", + "ext-intl": "Needed to improve host validation", + "league/uri-components": "Needed to easily manipulate URI objects", + "psr/http-factory": "Needed to use the URI factory" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI manipulation library", + "homepage": "https://uri.thephpleague.com", + "keywords": [ + "data-uri", + "file-uri", + "ftp", + "hostname", + "http", + "https", + "middleware", + "parse_str", + "parse_url", + "psr-7", + "query-string", + "querystring", + "rfc3986", + "rfc3987", + "rfc6570", + "uri", + "uri-template", + "url", + "ws" + ], + "support": { + "docs": "https://uri.thephpleague.com", + "forum": "https://thephpleague.slack.com", + "issues": "https://github.com/thephpleague/uri/issues", + "source": "https://github.com/thephpleague/uri/tree/6.7.2" + }, + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2022-09-13T19:50:42+00:00" + }, + { + "name": "league/uri-interfaces", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri-interfaces.git", + "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", + "reference": "00e7e2943f76d8cb50c7dfdc2f6dee356e15e383", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.19", + "phpstan/phpstan": "^0.12.90", + "phpstan/phpstan-phpunit": "^0.12.19", + "phpstan/phpstan-strict-rules": "^0.12.9", + "phpunit/phpunit": "^8.5.15 || ^9.5" + }, + "suggest": { + "ext-intl": "to use the IDNA feature", + "symfony/intl": "to use the IDNA feature via Symfony Polyfill" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "Common interface for URI representation", + "homepage": "http://github.com/thephpleague/uri-interfaces", + "keywords": [ + "rfc3986", + "rfc3987", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/thephpleague/uri-interfaces/issues", + "source": "https://github.com/thephpleague/uri-interfaces/tree/2.3.0" }, - "time": "2019-07-22T21:42:25+00:00" + "funding": [ + { + "url": "https://github.com/sponsors/nyamsprod", + "type": "github" + } + ], + "time": "2021-06-28T04:27:21+00:00" + }, + { + "name": "masterminds/html5", + "version": "2.7.6", + "source": { + "type": "git", + "url": "https://github.com/Masterminds/html5-php.git", + "reference": "897eb517a343a2281f11bc5556d6548db7d93947" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/897eb517a343a2281f11bc5556d6548db7d93947", + "reference": "897eb517a343a2281f11bc5556d6548db7d93947", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-dom": "*", + "ext-libxml": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "autoload": { + "psr-4": { + "Masterminds\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matt Butcher", + "email": "technosophos@gmail.com" + }, + { + "name": "Matt Farina", + "email": "matt@mattfarina.com" + }, + { + "name": "Asmir Mustafic", + "email": "goetas@gmail.com" + } + ], + "description": "An HTML5 parser and serializer.", + "homepage": "http://masterminds.github.io/html5-php", + "keywords": [ + "HTML5", + "dom", + "html", + "parser", + "querypath", + "serializer", + "xml" + ], + "support": { + "issues": "https://github.com/Masterminds/html5-php/issues", + "source": "https://github.com/Masterminds/html5-php/tree/2.7.6" + }, + "time": "2022-08-18T16:18:26+00:00" }, { "name": "pear/net_url2", @@ -323,6 +571,59 @@ "time": "2017-08-25T06:16:11+00:00" }, { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, + "time": "2016-08-06T14:39:51+00:00" + }, + { "name": "riimu/kit-pathjoin", "version": "v1.2.0", "source": { diff --git a/lib/Scraper/Scraper.php b/lib/Scraper/Scraper.php index 9d1c3ffe7..5deac358e 100644 --- a/lib/Scraper/Scraper.php +++ b/lib/Scraper/Scraper.php @@ -11,9 +11,9 @@ namespace OCA\News\Scraper; -use andreskrey\Readability\Readability; -use andreskrey\Readability\Configuration; -use andreskrey\Readability\ParseException; +use fivefilters\Readability\Readability; +use fivefilters\Readability\Configuration; +use fivefilters\Readability\ParseException; use Psr\Log\LoggerInterface; class Scraper implements IScraper |