Skip to content

Instantly share code, notes, and snippets.

@tranphuquy19
Last active April 12, 2020 11:43
Show Gist options
  • Save tranphuquy19/c374e194fa852ebe16234b7d3737c962 to your computer and use it in GitHub Desktop.
Save tranphuquy19/c374e194fa852ebe16234b7d3737c962 to your computer and use it in GitHub Desktop.

Hướng dẫn download Courses trên Pluralsight (tháng 4)

  • Các bạn có thể gửi Course đã tải cho mình tại địa chỉ Email: tranphuquy19@gmail.com để mình có thể chia sẻ cho các thành viên khác. Thanks all!

1. Đăng kí account Pluralsight free

2. Cài youtube-dl:

* Đối với Window:

  1. Tại cửa sổ duyệt file (File explore), click phải My Computer > Properties > mục Advanced system settings > tab Advanced > click Environment Variables > tại mục System variables tìm đến Path và click edit
  2. Tại cửa sổ Edit enviroment variables, click new và điền đường dẫn folder chứa file thực thi youtube-dl.exe ở trên, vd: C:\tools

* Đối với linux:

  • Mở termial chạy lệnh sau
sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl

2. File config

  • File config là file text chứa toàn bộ config để thực hiện download courses trên Pluralsight

* Với windows

  1. Tạo file có tên config.txt trong folder %APPDATA%\youtube-dir\ tạo thêm nếu chưa có

* Với linux

Với user hiện tại:

  • File config sẽ có đường dẫn /home/USERNAME/.config/youtube-dl/config.conf

Với root user:

  • File config sẽ có đường dẫn /etc/youtube-dl.conf

3. Edit file config

  • Sửa nội dung file config đã tạo ở trên với nội dung như sau
-u 'EMAIL'
-p 'PASSWORD'
-i
-c
--no-warnings
--no-check-certificate
--console-title
--batch-file='batch-file.txt'
--all-subs
--sleep-interval 120
--add-header Referer:"https://app.pluralsight.com/library/courses/"
-o '%(playlist_title)s/%(chapter_number)s - %(chapter)s/%(playlist_index)s-%(title)s.%(ext)s'
-f 'best[height<=720]/worst[height>720]'
  • Chú ý sửa email, và password đã đăng kí trên Pluralsight. Chương trình sẽ tự động download subtiles nếu có, mỗi lần download cách nhau 120s (nếu <120s thì Pluralsight sẽ ban account và mất quyền lợi)

4. Tạo file chứa các links download (batch-file)

  • Tạo mới 1 folder, trong folder tạo thêm 1 file có tên là batch-file.txt, tại thư mục bất kì vd C:\download (Window) hay \home<USERNAME>\download (Linux)

  • Nội dung batch-file.txt là link các courses trên Pluralsight, có thể để nhiều link

https://app.pluralsight.com/library/courses/spring-big-picture
https://app.pluralsight.com/library/courses/creating-first-spring-boot-application
https://app.pluralsight.com/library/courses/spring-jpa-hibernate
https://app.pluralsight.com/library/courses/react-native-fundamentals

5. Downloading

Window

  • Mở PowerShell với quyền administrator(click phải chọn Run as Administrator),
  • cd đến thư mục có chưa batch-file.txt, vd chạy lệnh sau:
cd C:\download

Linux

  • Mở Terminal
  • cd đến thư mục có chưa batch-file.txt, vd chạy lệnh sau:
cd *\home\<USERNAME>\download* # sửa theo tên username trên hệ thống!

Cuối cùng chạy lệnh

youtube-dl

6. Bonus

  • Việc tạo các file(file config hay file batch-file) trong các folder có vấn đề thì có thể tạo tại 1 folder bất kì và chạy lệnh dưới
youtube-dl --config-location 'PATH_CỦA_FILE_CONFIG' -a 'PATH_CỦA_BATCH_FILE'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment