/** * @param string $query * * @return \GuzzleHttp\Promise\PromiseInterface */ public function search($query) { $url = 'https://torrentproject.se/?s=' . urlencode($query) . '&out=json'; return $this->httpClient->requestAsync('GET', $url, $this->options)->then(function (ResponseInterface $response) { return (string) $response->getBody(); })->then(function ($htmlBody) use($query) { $response = new TrackerResponse(); $response->setTracker('torrentproject'); $response->setSearchResult(self::parseResponse($htmlBody)); $response->setQuery($query); return $response; }); }
/** * @param string $query * * @return \GuzzleHttp\Promise\PromiseInterface */ public function search($query) { $url = 'https://eztv.ag/search/' . $this->transformSearchString($query); return $this->httpClient->requestAsync('GET', $url, $this->options)->then(function ($response) { return (string) $response->getBody(); })->then(function ($htmlBody) use($query) { $response = new TrackerResponse(); $response->setTracker('EzTv'); $response->setSearchResult(Self::parseResponse($htmlBody)); $response->setQuery($query); return $response; }); }