23 lines
551 B
PHP
23 lines
551 B
PHP
<?php
|
|
namespace App\Services\Feeds;
|
|
|
|
use Goutte\Client;
|
|
|
|
class SanguFeed implements Feed
|
|
{
|
|
protected $client;
|
|
|
|
public function __construct()
|
|
{
|
|
$this->client = new Client();
|
|
}
|
|
public function get() : array
|
|
{
|
|
|
|
$crawler = $this->client->request('GET', "http://sangu.mv/");
|
|
|
|
return $crawler->filter('div[class*="large-5 medium-4 large-pull-7 medium-pull-8 small-12 columns"] .news-list .list-title a')
|
|
->extract(['_text', '_attr' => 'href']);
|
|
|
|
}
|
|
} |