miniflux-legacy/app/handlers/scraper.php

22 lines
375 B
PHP
Raw Normal View History

2016-08-19 04:33:58 +02:00
<?php
namespace Handler\Scraper;
use PicoFeed\Scraper\Scraper;
use 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;
}