Search the Community
Showing results for tags 'scrape'.
-
Hello all, I have a research task where I am suppose to write a script that will scrape the data and give an output in form of a json. The challenge I am facing is the table I am suppose to scrape from is unstructured (uneven pattern) how do we extract data from such a table I am putting down the table example here. I have tried various loops using simple_html_dom but failed (because of the table format), can someone guide me what should be the approach. I have added the html table here https://www.protectedtext.com/get-json-from-table-using-php-script password : 123. Any suggestion will be a help. Thanks in Advance!!!
-
Can any kind person help with a sample code for the following scenario: I need to search/retrieve price from one (or several external pages) and display the lowest price BEFORE adding the same product to our non-profit webshop. Thanks in avance! 🌹
-
Howdy, I just started experimenting with Goutte - found here on Github: https://github.com/f...ore-information I followed the examples almost exactly but here is my code anyways: <?php require_once 'goutte.phar'; use Goutte\Client; $client = new Client(); $crawler = $client->request('GET','http://www.cnn.com/'); $nodes = $crawler->filter('.error_list'); if ($nodes->count()) { // die(sprintf("Authentication error: %s\n", $nodes->text())); } // This part of the code I havent even changed yet being I can't get passed this problem :/ printf("Nb tasks: %d\n", $crawler->filter('nb_tasks')->text()); ?> Here is what is displayed on the page when running the php code: ????????G?? Fatal error: Class 'Goutte\Client' not found in /Applications/XAMPP/xamppfiles/htdocs/scrape.php on line 7. I have used PHP in the past but im a bit rusty, my apologies if it is something simple. I checked the Github issues and their doesn't appear to be any issues related to the problem I am currently having. I have the goutte.phar file in the same directory as the file with the code above so I am unsure why the fatal error is occurring on not finding the Client class? Thanks for the help!