このページのリストを使用したい:サッカークラブのチームのリスト
しかし、私はいつもこのエラーが発生します
致命的なエラー: Uncaught Error: Call to a member function find() on null in /home/u562375926/domains/lucswebsite.tech/public_html/resp/scrapvv.php:152 スタック トレース: #0 {main} throw in /home/ u562375926/domains/lucswebsite.tech/public_html/resp/scrapvv.php 行 152
このコードを使用して:
<?php
include('simple_html_dom.php');
$file = 'https://www.voetbalvlaanderen.be/club/1771/ploegen';
$html = new simple_html_dom();
$html->load_file($file);
$club = $html->find('div',8)->find(h2);
echo $club. '<br>';
?>
ParseHub で同じページを使用して、すべての a href と対応するスパンのテキストを取得しました。
そのページでDOMが機能していない可能性はありますか?