nodeValue; I'm trying to do web scrapin" /> nodeValue; I'm trying to do web scrapin" /> nodeValue; I'm trying to do web scrapin"/>

Attempt to read property "nodeValue" on null

140 Views Asked by At
$playerNames = $xpath->query('//table/tbody/tr/td[@class="hauptlink"]/a');

...

$playerName = $playerNames[$i]->nodeValue;

I'm trying to do web scraping with XPath using PHP from transfermarkt.com, but the path that contains the name of the players returns null, even if the path is correct

How can I resolve the problem?

0

There are 0 best solutions below