Avas Crawler fixes

This commit is contained in:
2020-10-03 20:07:38 +05:00
parent d8bfdf4693
commit ee8e34e0e3
3 changed files with 25 additions and 10 deletions

View File

@@ -18,7 +18,7 @@ class AvasScraper
$this->client = new Client;
}
public function extract($url)
public function extract($url, $date)
{
$crawler = $this->client->request('GET', $url);
@@ -64,7 +64,7 @@ class AvasScraper
'image' => $this->image,
'content' => $this->content,
'url' => $url,
'date' => Carbon::parse($crawler->filter('timeago')->first()->attr('datetime'))->format("Y-m-d H:i:s"),
'date' => $date,
'guid' => str_replace("https://avas.mv/","",$url),
'author' => $this->author,
'topics' => $this->topics