Skip to content

Instantly share code, notes, and snippets.

@sehmbimanvir
Last active May 17, 2020 13:18
Show Gist options
  • Save sehmbimanvir/63e3073f3ed27f2a1649a9c63b096914 to your computer and use it in GitHub Desktop.
Save sehmbimanvir/63e3073f3ed27f2a1649a9c63b096914 to your computer and use it in GitHub Desktop.
Scrap All Repositories
<?php
$data = $crawler->filter('article.Box-row')->each(function ($node) {
$anchorNode = $node->filter('h1 > a');
$data['title'] = $anchorNode->text();
$data['link'] = $anchorNode->attr('href');
$data['stars'] = $node->filter('div.text-gray > a')->text();
return $data;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment