Script continues on invalid directory permissions
Trying to download the Dr. Gains courses here: https://www.dr-gains.com/all-access-premium
They offered a free one-month trial for everything, so trying to download it so I can have time to look through.
After setting up config.php per the video and running the command, I get the following:
php thinkidownloader3.php https://programs.dr-gains.com/api/course_player/v2/courses/hypertrophy-total-leg-beginner
THINKIFIC DOWNLOADER
Revision 6.3.2 ~ 16th December 2023
Author : SumeetWeb ~ https://github.com/sumeetweb
Consider buying me a coffee at : https://www.ko-fi.com/sumeet
Want to download only selected videos? Thinki-Parser Experimental is available!
----------------------------------------------------------
Fetching Course Contents... Please Wait...
Downloading Program Organization, Terminology & Tips
No matches found for videos in HTML Item. Continuing...
Nothing gets downloaded. This particular course has 13 modules with around 9 lessons each, all in TEXT format.
It should download all the texts in HTML format.
I'll try again as I get some time later today; are there any flags I need to pass or anything special to do?
I double checked my process against your video, and as far as I can tell, everything is correct.
Course link, Set-Cookie, X-Thinkific-Client-Date...
I've tried a couple different courses, and they all result in the same output.
scarint@Nextcloud:/mnt/public/s/DrGains$ php thinkidownloader3.php https://programs.dr-gains.com/api/course_player/v2/courses/bfr-biceps-and-triceps-program-V3
THINKIFIC DOWNLOADER
Revision 6.3.2 ~ 16th December 2023
Author : SumeetWeb ~ https://github.com/sumeetweb
Consider buying me a coffee at : https://www.ko-fi.com/sumeet
Want to download only selected videos? Thinki-Parser Experimental is available!
----------------------------------------------------------
Fetching Course Contents... Please Wait...
Downloading Program Organization
No matches found for videos in HTML Item. Continuing...scarint@Nextcloud:/mnt/public/s/DrGains$
The only difference is that I'm running the script directly rather than in a docker container, because I've got a full php environment already. I'm going to give the docker method a shot.
Permissions error. I didn't have the correct permissions for the directory I was running the script in. Once I changed that, everything runs fine. Perhaps a permissions check on the working directory and appropriate error message...I'll leave that up to you. Pretty dumb error on my part.