Skip to content

Instantly share code, notes, and snippets.

@saasindustries
Last active January 18, 2021 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saasindustries/4fa85dd9a6a8ebf49c903cae81eb73da to your computer and use it in GitHub Desktop.
Save saasindustries/4fa85dd9a6a8ebf49c903cae81eb73da to your computer and use it in GitHub Desktop.
<?php
require 'vendor/autoload.php';
$client = new \Goutte\Client();
$crawler = $client->request('GET', 'https://www.imdb.com/title/tt2015381/reviews?ref_=tt_urv');
$results = [];
$results = $crawler->filter('.title')->each(function ($node) use ($results) {
array_push($results, $node->text());
return $results;
});
print_r($results);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment