r0oth3x49 / udemy-dl

A cross-platform python based utility to download courses from udemy for personal offline use.
MIT License
4.85k stars 1.2k forks source link

shell script to loop udemy-dl through all your courses #618

Closed CMMT20 closed 3 years ago

CMMT20 commented 3 years ago

Describe the bug Hi, this is not a bug, but i post cause has been very useful for me and i think will be to others Shell script to loop udemy-dl through all your courses, you download all with only one script This works in macOS Much of you already know how to do this, but for people like me who didn't

**To Reproduce: copy paste this en terminal

`array=( https://www.udemy.com/course/react-redux https://www.udemy.com/course/react-the-complete-guide-incl-redux https://www.udemy.com/course/result-oriented-web-developer-course https://www.udemy.com/course/sql-and-postgresql-for-beginners https://www.udemy.com/course/sql-mysql-for-data-analytics-and-business-intelligence https://www.udemy.com/course/statistics-for-data-science-and-business-analysis https://www.udemy.com/course/the-complete-app-design-course-ux-and-ui-design https://www.udemy.com/course/the-complete-crowdfunding-course-for-kickstarter-indiegogo https://www.udemy.com/course/the-complete-javascript-course https://www.udemy.com/course/the-complete-junior-to-senior-web-developer-roadmap https://www.udemy.com/course/the-complete-ruby-on-rails-developer-course https://www.udemy.com/course/the-complete-sql-bootcamp https://www.udemy.com/course/the-complete-web-developer-course-2 https://www.udemy.com/course/the-complete-web-developer-zero-to-mastery https://www.udemy.com/course/the-complete-wordpress-website-business-course https://www.udemy.com/course/the-ultimate-google-adwords-training-course https://www.udemy.com/course/the-ultimate-mysql-bootcamp-go-from-sql-beginner-to-expert https://www.udemy.com/course/ultimate-guide-to-ux https://www.udemy.com/course/understand-javascript https://www.udemy.com/course/wordpress-academy-2018-beginners-crash-course https://www.udemy.com/course/wordpress-multi-vendor-marketplace-ecommerce-website )

for u in "${array[@]}" do python udemy-dl.py "$u"

done`

Expected behavior This little script loop udemy-dl through the list of course you put in the array And download the content of all of them.

Screenshots

Python Environment (please complete the following information):

Additional context

CMMT20 commented 3 years ago

I don't know why, the editor doesn't keep indentation. Of course the action inside the loop is indented.

for u in "${array[@]}" do (indentation) python udemy-dl.py "$u"

done

CMMT20 commented 3 years ago

So it is an issue, hehe, how you can keep indentation when post an issue here? Sorry for so simple question, but it is simple when you know how to do it. Greetings.

dvlden commented 3 years ago

So it is an issue, hehe, how you can keep indentation when post an issue here? Sorry for so simple question, but it is simple when you know how to do it. Greetings.

Markdown Cheatsheet / Code

CMMT20 commented 3 years ago

Thanks, man.

xd003 commented 3 years ago

Sure this shell script loop will do the job of downloading multiple courses from your account but even then its not really ideal , i mean you would still have to go to each course and copy,paste their URL , that is quite some manual work if someone has to download all courses from their account . @r0oth3x49 i wonder if its possible for you to add the ability to fetch all courses from a account automatically and download it all one by one , that would be really be a great thing to have . You could specify a flag for it like --download-all which we can input in place of course URL

CMMT20 commented 3 years ago

Hi, sure, what you say is perfect solution. When i have time i'll try to code something like that. Anyway, the creator post somewhere this issue as a point to do. In the meantime copy paste urls is better than make one by one every download. As an improvement, if you want to save process and time. Using a chrome add like URL Opener Bulk, you can get the urls from opened tabs With minimal effort, and copy paste in the shell code. Less than a minute work, for all your courses.

xd003 commented 3 years ago

@CMMT20

Thanks for that suggestion , although I have to backup around 150 courses to my google drive . So i think i would have to wait for automatic downloading ability of all courses in a account

r0oth3x49 commented 3 years ago

@CMMT20 why you are using bash script to automate downloading multiple courses if you can provide a file containing list of course urls separated by new lines and udemy-dl will download it for you one by one.

see the release v1.0 features it's already implemented

CMMT20 commented 3 years ago

the answer is: my ignorance

When you're learning about and I'm, you learn to do what you need in a way that works until you learn to do it in a better way thanks for the info! regards

CMMT20 commented 3 years ago

I had posted my solution because no one had posted a better solution to this need a basic method but works well