Skip to content

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

License

Notifications You must be signed in to change notification settings

nospoon/laracasts-downloader

 
 

Repository files navigation

Laracasts Downloader

Join the chat at https://gitter.im/laracasts-downloader SensioLabsInsight Scrutinizer Code Quality Build Status

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

Currently looking for maintainers.

Description

Syncs your local folder with the laracasts website, when there are new lessons the app download it for you. If your local folder is empty, all lessons and series will be downloaded!

A .skip file is used to prevent downloading deleted lessons for these with space problems. Thanks to @vinicius73

Just call php makeskips.php before deleting the lessons.

Do I need an active subscription account?

You ONLY can download free episodes as guest and need active subscription to download all series.

I suggest starting the script as a guest at first step, this helps you to don't exceed daily download limits. Then fill your account credentials in .env and re-run project.

You need active subscription account to take advantage of cache feature.

Requirements

  • PHP >= 7.0
  • php-cURL
  • php-xml
  • php-json
  • Composer

OR

  • Docker

Installation

  1. Clone this repo to your local machine.
  2. Make a local copy of the .env file:
$ cp .env.example .env
  1. Update your laracasts account credentials (EMAIL, PASSWORD) in .env
  2. The next steps, choose if you want a local installation or a Docker based installation and follow along.

Using your local machine

  1. Install project dependencies:
$ composer install
  1. To run a download of all content, run the following command:
$ php start.php [empty for all OR provide flags]
  1. See downloading specific series or lessons for optional flags.

Using Docker

  1. Build the image:
$ docker-compose build
  1. Install project dependencies:
$ docker-compose run --rm composer
  1. Then, run the command of your choice as if we were running it locally, but instead against the docker container:
$ docker-compose run --rm laracastdl php ./start.php [empty for all OR provide flags]
  1. See downloading specific series or lessons for optional flags.

Also works in the browser, but is better from the cli because of the instant feedback.

Downloading specific series or lessons

  • You can use series and lessons names
  • You can use series and lessons slugs (preferred because there are some custom slugs too)
  • You can download multiples series/lessons

Commands to download an entire series

You can either use the Series slug (preferred):

$ php start.php -s "series-slug-example"
$ php start.php --series-name "series-slug-example"

Or the Series name:

$ php start.php -s "Series name example"
$ php start.php --series-name "Series name example"

Filter to download specific episodes of a series

You can provide episode number(s) saperated by comma ,: You can add 1 or more episodes.

$ php start.php -s "lesson-slug-example" -e "12,15"
$ php start.php --series-name "series-slug-example" --series-episodes "12,15"

Or the with Series name:

$ php start.php -s "Series name example" -e "12"
$ php start.php --series-name "Series name example" --series-episodes "12"

This will only download episodes which you mentioned in -e or --series-episodes flag, it will also ignor already downloaded episodes as usual.

Troubleshooting

If you have a cURL error 60: SSL certificate problem: self signed certificate in certificate chain or SLL error: cURL error 35 do this:

And you are done! If using apache you may need to restart it.

License

This library is under the MIT License, see the complete license here

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 99.6%
  • Shell 0.4%