伙计们,我正在尝试使用古特回购报废网站。这是我的代码
<?php
include 'vendor/autoload.php';
use Goutte\Client;
$client = new Client();
//define site url
$url = 'https://filmyzilla.me/cat.php';
$crawler = $client->request('GET', $url);
$crawler->filter('div[class="filmyvideo"] > a[class="filmyvideo"]')->each(function ($node) {
$href = $node->extract(array('href'));
var_dump($href[0]);
});
$crawler->filter('p > font[size="2"]')->each(function ($node) {
print $node->text()."\n<br>";
});
?>
但是此代码的问题是电影名称和链接均单独打印,我想在电影标题后打印href链接。预先感谢...