Giter VIP home page Giter VIP logo

code-with-mosh-playlist-downloader's Introduction

Code-With-Mosh-Playlist-Downloader

(only with valid login credentials)

Bash/Python Script: A script to download full course from codewithmosh.com, given one has the valid login credentials

Topics Available:

1 2 3
ReactJS NodeJS AngularJS: Beginner to Pro
Redux in Angular Angular4 Crash JS: Basics
JS: OOPS Complete Python Python Developers
SQL C# Basics C# Intermediate
C# Advanced C# Xamarin Native Apps The Complete ASP.NET MVC 5 Course
C# Unit test Clean Coding and Refactoring Build a Real-world App with ASP.NET Core 1.0+ and Angular 2+

๐Ÿ“Œ Aim

  • Help those who want to avoid themselves from 'clicks-and-saves'
  • To share a mixed-cum-messed-up learning experience (Python, JS, Shell Script etc)
  • Would try include a flow graph of events and Progress

โœŒ๏ธ Missions Accomplised:

  • Include as many Tutorials as possible
  • Implemented using Scraping Module in Python and Bash Scripts

๐Ÿ‘“ Download Options

  • Download Playlist for a specific topic
  • Download all Playlists at once (only mentioned Topics)

โ˜๏ธ Installation

Prerequisites

  • Install Python (Python2, if not installed on the system by default, like Ubuntu 18.04)
   sudo apt update
   sudo apt install python-pip
   pip --version
  • Install Beautiful Soup4 (python scraping module)
   sudo pip install beautifulsoup4 
  • Install lxml HTML parser
   sudo pip install lxml

Basic Steps

  1. Clone the Repository and open ./core
  2. Open the following files
  3. Change the login credentials
    • USERNAME (email)
    • PASSWORD
    • SCHOOL_ID (A numerical value found in your URL as you login)
      Sample URL: "https://sso.teachable.com/secure/121212/users/sign_in?clean_login=true&reset_purchase_session=1"
      Here the 121212 represents your SCHOOL_ID

Download a specific Playlist (say NodeJS)

  1. Open Topic_list.url
  2. Copy the URL of the desired topic (here NodeJS) from Topic_list.url
  3. Run
    chmod 777 ./playlist_downloader.sh
    playlist_downloaded.sh <topic_url> <topic_name>
  1. A new file named "<topic_name>.txt" will be generated
  2. Make a folder and copy the curl_script.sh and <topic_name>.txt to it
  3. Run
   chmod 777 ./curl_script.sh 
   ./curl_script.sh <topic_name>.txt
  1. This will start the download

Download All Playlists Available

  1. Run
    chmod 777 ./full_playlist_downloader.sh
    ./full_playlist_downloader.sh Topic_list.url
  1. New files named "<topic_name>.txt" will be generated. These files will have the content urls for download.

  2. For each file, that you want the playlist to download, make a folder and copy the curl_script.sh and <topic_name>.txt to it

  3. Run

   chmod 777 ./curl_script.sh 
   ./curl_script.sh <topic_name>.txt
  1. This will start the download
NOTE: The ReactJS playlist consumes upto 17 GB of your total data
Other modules can consume upto 35 GB (rough estimate) of your data
Recommended to use over Wifi only

๐Ÿ“š About

AboutTheFiles.md contains the details about the files used in this module.

๐ŸŒŸ Issues and Contributions

  • Want to contribute and be a part of this small project. Check the simplest contributing guidelines here
  • Contributions don't have to be very special. From 'simple typos' to 'serious bugs' all kinds of contributions are welcome! ๐Ÿ˜„

Thanks! โค๏ธ

๐Ÿ“œ License

MIT ยฉ Anshul Garg

code-with-mosh-playlist-downloader's People

Contributors

garganshul108 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

code-with-mosh-playlist-downloader's Issues

Script Working Description

This project is mere collection of scripts working together.

So it's kind of difficult to guess the flow/working of these files

It would be better if some kind of documentation about the working flow of the scripts is available for the interested contributors to read, and understand better.

Anyone who is willing to take up this task and document the working / flow of this project, is welcome for being a part of contributor community.
Do find the guidelines here.

Note: Read the AboutTheFiles.md to know about the working of each file individually.

Include some visuals like flowcharts with the text based details etc. as much as possible.

Script runs into "requests.exceptions.MissingSchema" error

Platform information

  • Operating system : MacOs Catalina (Version 10.15.1)
  • Python Version: 2.7.16

Details

On execution of the following command, the "requests.exceptions.MissingSchema" error is raised

$ ./playlist_downloader.sh https://codewithmosh.com/courses/enrolled/****** "Mastering React"

Screen Shot 2019-11-09 at 7 03 51 AM

@garganshul108

Design a easy and Beautiful UI for the script

UI makes it easier for people, who are not used to scripts/shell, operate things

  • Any suggestions, ideas are welcome
  • If one wants to contribute then he/she could directly open a PR
  • PR Guidelines are available here

Thanks โค๏ธ ๐Ÿ˜„

Download doesn't start automatically

The ./playlist_downloader script runs to generate a file named as <topic_name>.txt but the download after that doesn't start.

One has to make a folder and copy the ./curl_script and the <topic_name>.txt to the new folder.

Then run the following commands

chmod 777 ./curl_script.sh
./curl_script.sh <topic_name>.txt

Can this process be automated?

Anyone who is willing to make this work is welcome to contribute.

IndexError: list index out of range

$ ./playlist_downloader.sh https://codewithmosh.com/courses/293204/lectures/4509750 NodeJS
scraping title page from https://codewithmosh.com/courses/293204/lectures/4509750
Traceback (most recent call last):
File "scrape_via_login.py", line 37, in
main()
File "scrape_via_login.py", line 18, in main
authenticity_token = list(set(tree.xpath("//meta[@name='csrf-token']/@content")))[0]
IndexError: list index out of range
scraped into title.html
local scraping of contents
contents scraped
removing unneccesary title.html
NodeJS.txt
Traceback (most recent call last):
File "scrape_list_via_login.py", line 54, in
main()
File "scrape_list_via_login.py", line 20, in main
authenticity_token = list(set(tree.xpath("//meta[@name='csrf-token']/@content")))[0]
IndexError: list index out of range

A new topic on mosh

Hello,

can you update the new topic about "The Ultimate Design Patterns." That will be ptetty helpful

run script

Hi. I don't know python at all. How can I run this scripts to download the tutorials. Please help me.
Best regards.

Script fails to download some videos

Platform information

  • Operating system : MacOs Catalina (Version 10.15.1)
  • Python Version: 2.7.16

Details

On execution of the following command, the download process starts but fails for about 15 videos

$ ./curl_script.sh MasteringReact.txt

Screen Shot 2019-11-09 at 7 53 09 AM

@garganshul108

"You need to be logged in" error after first course section

The contents.url file contains all a course's pages, but the scrape_list_via_login.py populates urls for only the the first section of the course. After that, only the section headings are included.
This is because for some reason, the requests GET method doesn't work for the later urls, even if they are first in the file after the login POST method.
This seems to be something with the Code With Mosh site. I can't make out what is causing this.

This was noticed on the JavaScript Basics for Beginners course.
I haven't tested it on other courses yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.