Mihaaru scraper support

This commit is contained in:
2020-08-10 03:21:56 +05:00
parent 5af5f75175
commit fd2fc06115
4 changed files with 30 additions and 6 deletions

View File

@@ -15,15 +15,15 @@ class MihaaruService extends Client
{
$articles = $this->get("https://mihaaru.com/rss")["channel"]["item"];
$articlesitems = [];
$emihaaru = new MihaaruScraper();
$scraper = new MihaaruScraper();
foreach ($articles as $article) {
$link = $article['link'];
$date = $article['pubDate'];
$guid = $article['guid'];
$articlesitems[] = $emihaaru->extract($link, $date, $guid);
$articlesitems[] = $scraper->extract($link, $date, $guid);
}
return $articlesitems;