Last active
May 17, 2020 13:18
-
-
Save sehmbimanvir/63e3073f3ed27f2a1649a9c63b096914 to your computer and use it in GitHub Desktop.
Scrap All Repositories
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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