diff --git a/crawler/crawler.php b/crawler/crawler.php index e0aaa03..4f9e7fe 100644 --- a/crawler/crawler.php +++ b/crawler/crawler.php @@ -1,43 +1,41 @@ loadHTML($html); +// $dom = new DOMDocument; +// $dom->loadHTML($html); -$xpath = new DOMXPath($dom); -$query = '//ul[@class="pagination"]/child::*'; -$nodes = $xpath->query($query); +// $xpath = new DOMXPath($dom); +// $query = '//ul[@class="pagination"]/child::*'; +// $nodes = $xpath->query($query); -$GLOBALS['pdfs'] = 0; +// $GLOBALS['pdfs'] = 0; -// Loop through the selected nodes -foreach ($nodes as $node) { - // Do something with each node, for example, echo its content - $url = $node->getElementsByTagName('a')[0]->getAttribute('href'); - $number = intval($node->nodeValue); - if($number > $last_page){ - $last_page = $number; - } -} +// // Loop through the selected nodes +// foreach ($nodes as $node) { +// // Do something with each node, for example, echo its content +// $url = $node->getElementsByTagName('a')[0]->getAttribute('href'); +// $number = intval($node->nodeValue); +// if($number > $last_page){ +// $last_page = $number; +// } +// } -echo "[i] Found $last_page pages\n"; +// echo "[i] Found $last_page pages\n"; -//create an array with all pages -$pages = range(1,65); +// //create an array with all pages +// $pages = range(1,65); // foreach($pages as $page) // {