Thiladhun switch to virtual feed
This commit is contained in:
@@ -10,7 +10,6 @@ class ThiladhunScraper
|
||||
|
||||
protected $title;
|
||||
protected $content;
|
||||
protected $guid;
|
||||
protected $image;
|
||||
protected $author;
|
||||
protected $topics = [];
|
||||
@@ -34,9 +33,8 @@ class ThiladhunScraper
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function extract($url)
|
||||
public function extract($url, $date)
|
||||
{
|
||||
$this->guid = str_replace('https://thiladhun.com/', '', $url);
|
||||
|
||||
$crawler = $this->client->request('GET', $url);
|
||||
|
||||
@@ -75,10 +73,10 @@ class ThiladhunScraper
|
||||
'og_title' => str_replace(" | Thiladhun", "", $crawler->filter('title')->first()->text('content')),
|
||||
'image' => $this->image,
|
||||
'content' => $this->content,
|
||||
'date' => $crawler->filter('.entry-meta time')->attr('datetime'),
|
||||
'date' => $date,
|
||||
'url' => $url,
|
||||
'author' => $this->author,
|
||||
'guid' => $this->guid,
|
||||
'guid' => basename($url),
|
||||
'topics' => $this->topics ? : [
|
||||
[
|
||||
"name" => "ވަކި މަޢުލޫއެއް ނޭންގެ",
|
||||
|
||||
Reference in New Issue
Block a user