Skip to content

Commit

Permalink
Fixed new download link on the website, should work fine again
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosflorencio committed Apr 9, 2016
1 parent 448c956 commit 4ded291
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions App/Html/Parser.php
Expand Up @@ -75,18 +75,18 @@ public static function getToken($html)
* Gets the download link.
*
* @param $html
* @return
* @return string
* @throws NoDownloadLinkException
*/
public static function getDownloadLink($html)
{
preg_match('/(\/downloads\/\d+)/', $html, $matches);
preg_match('(\'\/downloads\/.+\')', $html, $matches);

if(isset($matches[0]) === false) {
throw new NoDownloadLinkException();
}

return $matches[0];
return LARACASTS_BASE_URL . substr($matches[0],1,-1);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -6,7 +6,7 @@

Downloads new lessons and series from laracasts if there are updates. Or the whole catalogue.

**Working good at 03/03/2016**
**Working good at 09/04/2016**

## Description
Syncs your local folder with the laracasts website, when there are new lessons the app download it for you.
Expand Down

0 comments on commit 4ded291

Please sign in to comment.