Giter Club home page Giter Club logo

skillshare-downloader's People

Contributors

anestan avatar bperel avatar houdinii avatar janowiesniak avatar jgera avatar kallqvist 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

skillshare-downloader's Issues

Ran into FIleNotFoundError

C:\Projects\skillshare-downloader\code>python example.py
Downloading C:\Projects\skillshare-downloader\code\data\fkane\data-science-and-machine-learning-with-python-hands-on/01 - introduction.mp4...
Traceback (most recent call last):
File "example.py", line 10, in
dl.download_course_by_url('https://www.skillshare.com/classes/Data-Science-and-Machine-Learning-with-Python-Hands-On/1263657127')
File "C:\Projects\skillshare-downloader\code\downloader.py", line 36, in download_course_by_url
self.download_course_by_class_id(m.group(1))
File "C:\Projects\skillshare-downloader\code\downloader.py", line 100, in download_course_by_class_id
video_id=video_id,
File "C:\Projects\skillshare-downloader\code\downloader.py", line 151, in download_video
with open(fpath, 'wb') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C\Projects\skillshare-downloader\code\data\fkane\data-science-and-machine-learning-with-python-hands-on/01 - introduction.mp4'

Am I doing something wrong?

Ability to download multiple classes at once

Hey there!

I have been using the skillshare downloader and it works great, but I have a problem. I can't manually download the videos by editing it all the time since I have a large collection of classes to download.

I was wondering if there is a way to download multiple videos at once, it could be VERY handy. The program overall does the job fine and keep the great work up man!

Not able to download any video except the welcome or first video

Traceback (most recent call last):
File "/code/example.py", line 11, in
dl.download_course_by_url('https://www.skillshare.com/classes/How-to-Ace-your-Exams-The-Method-to-Mastery/1787903253')
File "/code/downloader.py", line 36, in download_course_by_url
self.download_course_by_class_id(m.group(1))
File "/code/downloader.py", line 83, in download_course_by_class_id
raise Exception('Failed to read video ID from data')
Exception: Failed to read video ID from data

Exception: Failed to read video ID from data

After downloading a course, this error keeps appearing when I try to download another one
I checked that the cookie was ok and it is (it's the same I used with the other course)

Mac user

Hi, is there a mac version of this program please?

Found fix

Determined that 2 modifications are required to the source code for this to work. First install an older version of the slugify package (anything before 4.0.0) and then reference one of the previous posts about failing to fetch video id. Replace the if statement with the new one the user provided and then everything should work hope this helps.

Error - Exception: Failed to fetch video meta

I have used skillshare-downloader for a number of courses to be able to watch them off line but today I ran across an issue I haven't seen before. I am attempting to download a course that has over 200 videos and on video 134, I get the following:

Traceback (most recent call last):

File "", line 1, in
runfile('L:/downloaded/dl/skillshare-downloader-master/code/SkillshareDownload.py', wdir='L:/downloaded/dl/skillshare-downloader-master/code')

File "P:\Users\Jess\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile
execfile(filename, namespace)

File "P:\Users\Jess\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "L:/downloaded/dl/skillshare-downloader-master/code/SkillshareDownload.py", line 10, in
dl.download_course_by_url("https://www.skillshare.com/classes/BECOME-A-GREAT-SINGER-Your-Complete-Vocal-Training-System/1213366843?via=search-layout-grid")

File "L:\downloaded\dl\skillshare-downloader-master\code\downloader.py", line 36, in download_course_by_url
self.download_course_by_class_id(m.group(1))

File "L:\downloaded\dl\skillshare-downloader-master\code\downloader.py", line 108, in download_course_by_class_id
video_id=video_id,

File "L:\downloaded\dl\skillshare-downloader-master\code\downloader.py", line 145, in download_video
raise Exception('Failed to fetch video meta')

Exception: Failed to fetch video meta

Running the program just returns nothing?

Each time I run the program with python example.py it just returns nothing I have uploaded a screenshot and example.py code (minus the cookie part) also I am running Kali Linux. Thanks in advance!
image
`from downloader import Downloader

cookie = """
I think you put your cookies between the speech marks or do you remove them?
"""

dl = Downloader(cookie=cookie)

download by class URL:
('https://www.skillshare.com/classes/Python-3-A-Beginners-Guide-to-Python-Programming/821742951')

or by class ID:
dl.download_course_by_class_id(821742951)`

Just first video downloaded

Traceback (most recent call last):
  File "J:\Downloads\AverageSpatialSearch\main.py", line 10, in <module>
    dl.download_course_by_url('https://www.skillshare.com/classes/How-to-Make-Apps-with-No-Programming-Experience/1960310793')
  File "downloader.py", line 24, in download_course_by_url
    self.download_course_by_class_id(m.group(1))
  File "downloader.py", line 63, in download_course_by_class_id
    raise Exception('Failed to read video ID from data')
Exception: Failed to read video ID from data

I can not solve this problem. May be you can solve??

MP4 filename error. Unicode/Ascii encoding related [Linux]

Hey man, sorry for bugging you again :P
So I shifted to a linux environment because the program is optimized for it, I guess.
(It kept throwing errors on windows that I didn't have the energy to work on.)
Everything was working absolutely fine but this one time around when I was downloading a course this happened:

skillshare-dl-bug3

I did a quick search and found it has something to do with using the str() function on line 58 in downloader.py. Is a quick fix possible by using an alternative function? If you need an account cookie to test the code, you can use mine :)

Cheers mate ๐Ÿ‘

Error - Exception: Failed to fetch video meta

I have got the same issue like this one:
Exception: Failed to fetch video meta
In my case a certain video doesn't play on Skillshare and the program gets stuck on that video and I don't know how to tell the program to skip that video like the person who posted this same issue last time.

Any suggestions would be helpfull.

install slugify, request

if the slugify is already installed:
pip uninstall slugify

and then

for slugify:
pip install python-slugify

for requests:
pip install requests

Exception: Fetch error, code == 403

I have a valid subscription but I have been receiving this error. This is happening after I had successfully downloaded a couple of courses.

Unicode Error

I am getting the following error - Python 2

C:\code>python example.py
Traceback (most recent call last):
  File "example.py", line 10, in <module>
    dl.download_course_by_url('https://www.skillshare.com/classes/How-to-Get-a-Job-as-a-Front-End-Web-Developer-The-Complete-Step-by-Step-Guide/1711276638?via=search-layout-grid')
  File "C:\code\downloader.py", line 36, in download_course_by_url
    self.download_course_by_class_id(m.group(1))
  File "C:\code\downloader.py", line 62, in download_course_by_class_id
    slugify(teacher_name),
  File "C:\Python27\lib\site-packages\slugify.py", line 26, in slugify
    unicodedata.normalize('NFKD', string)
TypeError: normalize() argument 2 must be unicode, not str

Resolution to download

Is there a way to set the resolution to be downloaded? Currently it is 1280. I would like to download more, hence would be happy if the resolution could be set lower.

Unicode error

Hi there, I'm getting an error when using the script.

C:\Users\***>python D:\skillshare-downloader-master\code\exemple.py
Traceback (most recent call last):
  File "D:\skillshare-downloader-master\code\exemple.py", line 10, in <module>
    dl.download_course_by_url('https://www.skillshare.com/classes/Art-Fundamentals-in-One-Hour/189505397')
  File "D:\skillshare-downloader-master\code\downloader.py", line 24, in download_course_by_url
    self.download_course_by_class_id(m.group(1))
  File "D:\skillshare-downloader-master\code\downloader.py", line 35, in download_course_by_class_id
    if isinstance(teacher_name, unicode):
NameError: name 'unicode' is not defined

I thought this might have been an error due to using Python 3 instead or 2.7, but using 2.7 got me another error:

C:\Users\***> C:\Python27\python.exe D:\skillshare-downloader-master\code\exemple.py
Traceback (most recent call last):
  File "D:\skillshare-downloader-master\code\exemple.py", line 1, in <module>
    from downloader import Downloader
  File "D:\skillshare-downloader-master\code\downloader.py", line 1, in <module>
    import requests
ImportError: No module named requests

I don't really know what could be wrong, so I'm asking the question here, sorry :/

document.cookie where?

I use Google to sign in to skillshare so maybe that's the issue. Could that be why I can't find document.cookie?

error downloader.py

When i execute the script i get this error

Downloading /data/hardyfowler/art-fundamentals-in-one-hour/01 - trailer.mp4...
Video already downloaded, skipping...

Traceback (most recent call last):
  File "example.py", line 10, in <module>
    dl.download_course_by_url('https://www.skillshare.com/classes/Art-Fundamentals-in-One-Hour/189505397')
  File "/code/downloader.py", line 36, in download_course_by_url
    self.download_course_by_class_id(m.group(1))
  File "/code/downloader.py", line 83, in download_course_by_class_id
    raise Exception('Failed to read video ID from data')
Exception: Failed to read video ID from data
PS C:\skillshare> docker-compose run --rm ssdl python example.py
Downloading /data/hardyfowler/art-fundamentals-in-one-hour/01 - trailer.mp4...
Video already downloaded, skipping...

Traceback (most recent call last):
  File "example.py", line 10, in <module>
    dl.download_course_by_url('https://www.skillshare.com/classes/Art-Fundamentals-in-One-Hour/189505397')
  File "/code/downloader.py", line 36, in download_course_by_url
    self.download_course_by_class_id(m.group(1))
  File "/code/downloader.py", line 83, in download_course_by_class_id
    raise Exception('Failed to read video ID from data')
Exception: Failed to read video ID from data

download folder permissions

You need to change hard-coded path to download location. On Linux based system, you won't be able to download in to /data... change this to ../data or smth like that. Otherwise is working quite right...

I dont know anything

Guys please help me. I am just trying to download my class. I dont know anything about coding. I spent an hour to find out I need python. Please help and tell me how exactly I need to the thing to download my steps.

SSLError Max retries exceeded with url

Traceback (most recent call last):
  File "/Users/studio/PycharmProjects/pythonProject/main.py", line 181, in <module>
    dl.download_course_by_class_id(1313617582)
  File "/Users/studio/PycharmProjects/pythonProject/main.py", line 39, in download_course_by_class_id
    data = self.fetch_course_data_by_class_id(class_id=class_id)
  File "/Users/studio/PycharmProjects/pythonProject/main.py", line 111, in fetch_course_data_by_class_id
    'cookie': self.cookie,
  File "/Users/studio/PycharmProjects/pythonProject/venv/lib/python2.7/site-packages/requests/api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "/Users/studio/PycharmProjects/pythonProject/venv/lib/python2.7/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/Users/studio/PycharmProjects/pythonProject/venv/lib/python2.7/site-packages/requests/sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/studio/PycharmProjects/pythonProject/venv/lib/python2.7/site-packages/requests/sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "/Users/studio/PycharmProjects/pythonProject/venv/lib/python2.7/site-packages/requests/adapters.py", line 514, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.skillshare.com', port=443): Max retries exceeded with url: /classes/1313617582 (Caused by SSLError(SSLError(1, u'[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)'),))

Cannot find document.cookie

I followed the instructions to find the cookie but I still cannot find it. when I type in document.cookie into the console nothing pops up :(
Please help

Unicode error

I'm a python noob :( any help would be awesome

I run the command: docker-compose run --rm ssdl python example.py

and get this:

Traceback (most recent call last):
File "example.py", line 10, in
dl.download_course_by_url('https://www.skillshare.com/classes/Art-Fundamentals-in-One-Hour/189505397')
File "/code/downloader.py", line 36, in download_course_by_url
self.download_course_by_class_id(m.group(1))
File "/code/downloader.py", line 39, in download_course_by_class_id
data = self.fetch_course_data_by_class_id(class_id=class_id)
File "/code/downloader.py", line 106, in fetch_course_data_by_class_id
res = requests.get(
File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 76, in get
return request('get', url, params=params, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 61, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 387, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/local/lib/python3.8/http/client.py", line 1230, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.8/http/client.py", line 1271, in _send_request
self.putheader(hdr, value)
File "/usr/local/lib/python3.8/http/client.py", line 1203, in putheader
values[i] = one_value.encode('latin-1')
UnicodeEncodeError: 'latin-1' codec can't encode character '\u2026' in position 399: ordinal not in range(256)

Add reading from a text file.

I have a list of courses which I have compiled and want to download. It would be really great if you were to add reading from a .txt file, because having to add the URLs manually takes a lot of work. I appreciate what you've made and I hope my suggestion can make it better.

Thanks!

Skipped Video.

The program skipped downloading video # 3 and went ahead with video # 4

skillshare-download-bug1

What could be the reason for this? Also, is this tool specifically built for windows? I ask because I tweaked some of the code to include a variable that asks for the course url on running the script so that I don't have to manually paste the course url in the source code. So what I discovered was that when I downloaded a course that had a colon (:) in it's name, it gave me this error:

> C:\skillshare-download\code>example.py
> Enter Course URL:https://www.skillshare.com/classes/Mobile-Photography-Creating-
> Consistent-Look-and-Feel/158630588
> Traceback (most recent call last):
>   File "C:\skillshare-download\code\example.py", line 12, in <module>
>     dl.download_course_by_url(course_url)
>   File "C:\skillshare-download\code\downloader.py", line 24, in download_course_
> by_url
>     self.download_course_by_class_id(m.group(1))
>   File "C:\skillshare-download\code\downloader.py", line 42, in download_course_
> by_class_id
>     os.makedirs(base_path)
>   File "C:\Python27\lib\os.py", line 157, in makedirs
>     mkdir(name, mode)
> WindowsError: [Error 267] The directory name is invalid: '/data/ioegreer/Mobile
> Photography: Creating Consistent Look and Feel'

Windows does not allow a colon in its naming conventions. I suggest you replace every space and other special character(s) from the course name to a dash (-) so that windows doesn't complain about the naming. If I knew python better I'd do it myself but I don't so please look this over as soon as you can.

Cheers mate. This tool will save me a ton of manually constructing URL's for each video using chromes network monitor :D (If I can get it to work :P )

document.cookie not found

Hey there, I am having an issue when I search for document.cookie in console. for some reason nothing shows up. Any help?

Name 'unicode' is not defined

Traceback (most recent call last):
File "example.py", line 10, in
dl.download_course_by_url('')
File "/home/boogyman/skillshare-downloader/code/downloader.py", line 38, in download_course_by_url
self.download_course_by_class_id(m.group(1))
File "/home/boogyman/skillshare-downloader/code/downloader.py", line 64, in download_course_by_class_id
slugify(teacher_name),
File "/home/boogyman/.local/lib/python3.8/site-packages/slugify.py", line 24, in slugify
unicode(
NameError: name 'unicode' is not defined

Exception: Failed to read video ID from data

Hello!

I always get after downloading the first video (the free preview) of a course, the following error:
Exception: Failed to read video ID from data

Thought that my cookie might be wrong but the free preview is also beeing downloaded without a cookie.

Need help, thank you!

Failed to read video ID from data

Downloading C:\Users...\data\theawwwesomes\boost-personal-branding-by-coding-your-own-website-html-css-basics/01 - intro.mp4...
[==================================================]

Traceback (most recent call last):
File "C:\Users...\Downloads\skillshare-downloader-master\skillshare-downloader-master\code\example.py", line 10, in
dl.download_course_by_url('https://www.skillshare.com/classes/Boost-Personal-Branding-by-Coding-Your-Own-Website-HTML-CSS-Basics/1551945410')
File "C:\Users...\Downloads\skillshare-downloader-master\skillshare-downloader-master\code\downloader.py", line 36, in download_course_by_url
self.download_course_by_class_id(m.group(1))
File "C:\Users...\Downloads\skillshare-downloader-master\skillshare-downloader-master\code\downloader.py", line 83, in download_course_by_class_id
raise Exception('Failed to read video ID from data')
Exception: Failed to read video ID from data

Cant download videos with non ASCII characters in title

it's an absolute time saver, thanks a lot

not able to download videos with non-ASCII characters in the title, tried converting to ASCII using sublime text, added UTF-8 as the coding in downloader.py, nothing helped can you suggest some workaround.

KeyError: 'container'

When i execute the script i get this error

Traceback (most recent call last):
File "example.py", line 12, in
dl.download_course_by_class_id(387672280)
File "/home/ibrahim/Downloads/pyles/sw/skillshare-downloader-master/code/downloader.py", line 100, in download_course_by_class_id
video_id=video_id,
File "/home/ibrahim/Downloads/pyles/sw/skillshare-downloader-master/code/downloader.py", line 140, in download_video
if x['container'] == 'MP4' and 'src' in x:
KeyError: 'container'

Can anyone help with using this tool?

So I thought I had everything setup: installed slug, etc...

but for some reason, whenever I run the script, it keeps giving me a "ModuleNotFoundError: No module named 'urllib2'"

How do I install this module?

image

How can I find my skillshare cookie?

The instruction on the ReadMe is quite confusing.

I've tried using both Firefox and Chrome and can't seem to find the mentioned 'document.cookie' anywhere in the development tools.

Without the right cookie, the app only downloads the first video and fails when it tries to download the rest.

Failed to establish a new connection: [WinError 10060]

After implementing changes discussed in issue #32, the script started working again. But an attempt to resume an unfinished download, which normally should skip already downloaded videos, results in multiple errors.

Failed to establish a new connection: [WinError 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond

Module not found error

%Run example.py
Traceback (most recent call last):
File "C:\Users\x\Downloads\skillshare-downloader-master\code\example.py", line 1, in
from downloader import Downloader
File "C:\Users\x\Downloads\skillshare-downloader-master\code\downloader.py", line 1, in
import requests
ModuleNotFoundError: No module named 'requests'

I was using it yesterday just fine. Not sure what changed. There was a windows update and I'm not sure if it broke something. lol

Edit:
I'm on Windows 10. Using Thonny to edit. I tried removing and reinstalling all python related stuff including Thonny.

Now I'm getting this error:

"raise Exception('Failed to read video ID from data')
Exception: Failed to read video ID from data"

Can someone please confirm if this scrpit is still working and it's just an error on my end?

Edit:
I was able to make it work. Kind of. I've re-installed everything and added some lines from the other topic issue. However, the cookie doesn't seem to last before I had this issue. I need to logoff the account from browser then login again then copy the new cookie for it to work. Any solutions?

TypeError: normalize() argument 2 must be unicode, not str

Hello there!

I tried running the script and this what it says! I'm sorry but I'm a total noob at everything coding and I can't find a solution :( I think I got the right document.cookie, so I can't figure out what's wrong. Please help!

Thanks in advance.

Traceback (most recent call last):

Traceback (most recent call last):
File "C:\Users\test\Desktop\skillshare-downloader\skillshare-downloader-master\code\example.py", line 10, in
dl.download_course_by_url('https://www.skillshare.com/classes/Learn-Adobe-Photoshop-Like-a-Pro-Advanced-Techniques/1959580090')
File "C:\Users\test\Desktop\skillshare-downloader\skillshare-downloader-master\code\downloader.py", line 36, in download_course_by_url
self.download_course_by_class_id(m.group(1))
File "C:\Users\test\Desktop\skillshare-downloader\skillshare-downloader-master\code\downloader.py", line 83, in download_course_by_class_id
raise Exception('Failed to read video ID from data')
Exception: Failed to read video ID from data

C:\Users\test\Desktop\skillshare-downloader\skillshare-downloader-master\code>pause
Press any key to continue . . .

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.