Skip to content

Commit

Permalink
fix(main-class): search by compound term fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
dorianneto committed Aug 26, 2016
1 parent 7a8ad9f commit 85e0aea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/PodcastCrawler.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ public function search($value)
private function getSearch($value)
{
$Request = new Request;
$value = is_string($value) ? urlencode($value) : $value;
$url = is_int($value) ? self::LOOKUP_URL . "?id={$value}" : self::SEARCH_URL . "?term={$value}";
$url = urldecode($url . '&' . $this->defaultQuery);
$url = $url . '&' . $this->defaultQuery;
$response = $Request->request($url);

if (is_null($response)) {
Expand Down

0 comments on commit 85e0aea

Please sign in to comment.