Пример #1
0
 public function loadPath($path)
 {
     $html = $this->_getContent($path);
     $_ = \phpQuery::newDocument(str_replace(' ', ' ', $html));
     $torrents = [];
     foreach ($_['table#searchResult tr'] as $tr) {
         $torrent = Torrent::torrentWithTr(pq($tr));
         if ($torrent) {
             $torrents[] = $torrent;
         }
     }
     return ['items' => $torrents, 'next' => $_['a img[alt="Next"]']->parent()->attr('href')];
 }