fix jazeera
This commit is contained in:
@@ -36,7 +36,7 @@ class JazeeraScraper
|
|||||||
"slug" => basename($node->attr('href'))
|
"slug" => basename($node->attr('href'))
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -45,11 +45,12 @@ class JazeeraScraper
|
|||||||
}
|
}
|
||||||
//Remove all the alphabets from string
|
//Remove all the alphabets from string
|
||||||
//preg_replace("/[a-zA-Z]/", "",$string);
|
//preg_replace("/[a-zA-Z]/", "",$string);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'source' => 'Jazeera',
|
'source' => 'Jazeera',
|
||||||
'title' => $crawler->filter('h1')->first()->text(),
|
'title' => $crawler->filter('h1')->first()->text(),
|
||||||
'og_title' => $crawler->filter('meta[property*="og:title"]')->first()->attr('content'),
|
'og_title' => $crawler->filter('meta[property*="og:title"]')->first()->attr('content'),
|
||||||
'image' => $crawler->filter(".single-entry-thumb img")->first()->attr('data-src'),
|
'image' => $crawler->filter(".single-entry-thumb img")->first()->attr('src'),
|
||||||
'content' => $this->content,
|
'content' => $this->content,
|
||||||
'url' => strtok($url,'?'),
|
'url' => strtok($url,'?'),
|
||||||
'date' => Carbon::parse($date)->format("Y-m-d H:i:s"),
|
'date' => Carbon::parse($date)->format("Y-m-d H:i:s"),
|
||||||
|
|||||||
Reference in New Issue
Block a user