miniflux-legacy/app/handlers/scraper.php
2016-08-24 21:17:58 -04:00

22 lines
393 B
PHP

<?php
namespace Miniflux\Handler\Scraper;
use PicoFeed\Scraper\Scraper;
use Miniflux\Model\Config;
function download_contents($url)
{
$contents = '';
$scraper = new Scraper(Config\get_reader_config());
$scraper->setUrl($url);
$scraper->execute();
if ($scraper->hasRelevantContent()) {
$contents = $scraper->getFilteredContent();
}
return $contents;
}