2017 © Pedro Peláez
 

library recursive-pagination

Recursive Pagination

image

xparse/recursive-pagination

Recursive Pagination

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 11 Versions
  • 10 % Grown

The README.md

Abandoned !!!

See xparse/Parser, (*1)

Recursive Pagination

Recursive Pagination allows you to parse website pages recursively. You need to pass link from where to start and set next page expression (xPath, css, etc)., (*2)

Installation

You can install the package via Composer, (*3)

``` bash $ composer require xparse/recursive-pagination, (*4)


## Basic Usage Try to find all links to the repositories on github. Our query will be `xparse`. With recursive pagination we can traverse all pagination links and process each resulting page to fetch repositories links. ```php use Xparse\Parser\Parser; use Xparse\RecursivePagination\RecursivePagination; # init Parser $parser = new Parser(); # set expression to pagination links $paginator = new RecursivePagination($parser, "//*[@class='pagination']//a/@href"); # set initial page url $paginator->addToQueue('https://github.com/search?q=xparse'); $allLinks = []; while (($page = $paginator->getNextPage())) { # set expression to fetch repository links $adsList = $page->value("//*[@class='repo-list-name']//a/@href")->getItems(); # merge and remove duplicates $allLinks = array_values(array_unique(array_merge($allLinks, $adsList))); } print_r($allLinks);

Testing

bash $ vendor/bin/phpunit, (*5)

Credits

License

The MIT License (MIT). Please see License File for more information., (*6)

The Versions

23/07 2018

dev-master

9999999-dev https://github.com/xparse/RecursivePagination

Recursive Pagination

  Sources   Download

MIT

The Requires

 

The Development Requires

pagination xparse

23/07 2018

0.3.0

0.3.0.0 https://github.com/xparse/RecursivePagination

Recursive Pagination

  Sources   Download

MIT

The Requires

 

The Development Requires

pagination xparse

07/02 2018

0.2.1

0.2.1.0 https://github.com/xparse/RecursivePagination

Recursive Pagination

  Sources   Download

MIT

The Requires

 

The Development Requires

pagination xparse

05/09 2017

0.2.0

0.2.0.0 https://github.com/xparse/RecursivePagination

Recursive Pagination

  Sources   Download

MIT

The Requires

 

The Development Requires

pagination xparse

30/08 2016

0.1.0-alpha.2

0.1.0.0-alpha2 https://github.com/xparse/RecursivePagination

Recursive Pagination

  Sources   Download

MIT

The Requires

 

The Development Requires

pagination xparse

27/05 2016

0.1.0-alpha.1

0.1.0.0-alpha1 https://github.com/xparse/RecursivePagination

Recursive Pagination

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

pagination xparse

25/05 2016

0.0.5

0.0.5.0 https://github.com/xparse/RecursivePagination

Recursive Pagination

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

pagination xparse

18/05 2016

0.0.4

0.0.4.0 https://github.com/xparse/RecursivePagination

Recursive Pagination

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

pagination xparse

28/08 2015

v0.0.3

0.0.3.0 https://github.com/xparse/RecursivePagination

Recursive Pagination

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

pagination xparse

07/08 2015

0.0.2

0.0.2.0 https://github.com/xparse/RecursivePagination

Recursive Pagination

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

pagination xparse

10/12 2014

0.0.1

0.0.1.0 https://github.com/xparse/recursive-pagination

Recursive Pagination

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

pagination xparse