fix voice
This commit is contained in:
@@ -9,8 +9,9 @@ class VoiceFeed implements Feed
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->client = new Client();
|
||||
}
|
||||
$this->client = new Client();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all the latest news
|
||||
*
|
||||
@@ -18,11 +19,14 @@ class VoiceFeed implements Feed
|
||||
*/
|
||||
public function get() : array
|
||||
{
|
||||
|
||||
$crawler = $this->client->request('GET', "https://voice.mv/");
|
||||
|
||||
return $crawler->filter('div[id*="latest-news"] .content a')
|
||||
->extract(['_text', '_attr' => 'href']);
|
||||
|
||||
return $crawler->filter('div#latest-news > div > a')->each(function ($node) {
|
||||
return [
|
||||
"title" => $node->filter('.dv-bold')->text(),
|
||||
"link" => 'https://voice.mv' . $node->attr('href'),
|
||||
"date" => $node->filter('.en-font')->text(),
|
||||
];
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user