Open behnamshateri opened 4 years ago
I use guotte for scrapping a web page in laravel. I need to get part of data that is in a variable in the script tag in DOM on loaing page:
<script type="text/javascript"> var matchData = { sportId: 0, id: 81020 } </script>
i need all data that is in matchData parameter that load in the DOM when page is loaded.
you can use some regex like this:
$node = $crawler->filterXPath('//script[contains(.,"matchData")]')->text();
you should be able then with a regex to get that content
I use guotte for scrapping a web page in laravel. I need to get part of data that is in a variable in the script tag in DOM on loaing page:
i need all data that is in matchData parameter that load in the DOM when page is loaded.