Meta information and article body cast

This commit is contained in:
2020-08-10 21:23:16 +05:00
parent 51076aca33
commit 8d8e174095
6 changed files with 23 additions and 10 deletions

View File

@@ -43,11 +43,8 @@ class MihaaruScraper
$this->author = $cleaneddata;
});
$crawler->filter('article')->each(function ($node) {
$content = $node->text();
$input = str_replace("\n", '', $content);
$this->content = $input;
$crawler->filter('article p')->each(function ($node) {
$this->content[] = preg_replace("/[a-zA-Z]/","",$node->text());
});
$crawler->filter('.article-tags')->each(function ($node) {