calvinhobbes23 / Skillshare-DL

146 stars 164 forks source link

Working solution for `Exception: Failed to read video ID from data` for beginners #18

Open Harkishen-Singh opened 2 years ago

Harkishen-Singh commented 2 years ago

I will try to write all the steps for absolute beginners as I found people in #16 struggling to get this working. Please expect this answer to be long/verbose.

Proof of working Screenshot from 2022-03-09 09-00-30

Before we move to steps, there are some things to keep in mind:

  1. You need a system with following requirements 1.1. Linux system. I used Ubuntu 20.04 (Zorin flavour). But I think any linux system as long as it runs python3.7 will work fine 1.2 You need to get python3.7 only! Any other version will give error. For example, I used python3.9 and it gave me ImportError: bad magic number in 'magic': b'B\r\r\n', which I think happened because magic.pyc was encoded in python3.7 and binary encoding of python3.7 should be different than python3.9. You can download python3.7 from here.
  2. You will need to download 2 files. One is the repository (the software skillshare-dl) and the other is a magic.pyc that contains login information for skillshare.

The software can be downloaded by:

  1. clicking this link. After downloading, you will have to unzip the file.
  2. or using git clone github.com/calvinhobbes23/Skillshare-DL

Now you have the software. The next step is to get the login information, which is what the cookie stuff is written in #16. But thankfully, @d4n76 has shared this in this https://github.com/calvinhobbes23/Skillshare-DL/issues/16#issuecomment-1046286669. Click on that comment and download the magic.zip. After downloading, you need to unzip it.

After unzipping magic.zip, open the folder and you will see magic.pyc. AFAIK, this is the precompiled version containing all details regarding login information. Move this file inside the downloaded software folder and replace the existing magic.pyc file there.

Before moving to the downloading part, lets install the dependencies. For this, open the terminal in the folder where you downloaded the software and paste python3.7 -m pip install -r requirements.txt. This will install all dependencies required for skillshare-dl to work.

To start downloading the course, open the terminal and type in the following manner python3.7 dl.py <complete URL of the video>

example:

python3.7 dl.py "https://www.skillshare.com/classes/The-Staples-of-Branding-From-Purpose-to-Product/915436837"

This will download your course and save in Skillshare folder in the same folder where the software was present.

If I missed any step or anything doesn't work, please let me know by via comment in this issue. I hope this helps. If this works for you, kindly ❤️ the issue so that others can know as well.

ghost commented 2 years ago

You can also use MacOS for this to work, but if you have python 3.8 or older, you can create a virtual environment and download Python 3.7.0 to make it work there with its respective requirements (https://github.com/calvinhobbes23/Skillshare-DL/issues/16#issuecomment-1065756156).

Tested on MacOS BigSur 11.4

Screen Shot 2022-03-11 at 19 28 14
dudeKill commented 2 years ago

Cool It Works On Windows Too! Tried On Virtual Environment with Python 3.7 ! Wonder what's wrong on google colab !?

abdul-usman commented 1 year ago

If you want any course I will download and send just email me - abdulu767@gmail.com

SakAwans commented 8 months ago

I'm a newbie and i just wanted to download this class so go easy on me :) i just follow your step but i'm still getting this error Traceback (most recent call last): File "dl.py", line 2, in from skillshare import Skillshare, splash File "C:\Users\SakAwans\Desktop\Skillshare-DL-master\skillshare.py", line 1, in import requests, json, sys, re, os ModuleNotFoundError: No module named 'requests' Capture can you please help me to get rid of this error msg? i would really appreciate that!