kallqvist / skillshare-downloader

MIT License
313 stars 105 forks source link

Resolution to download #26

Open realkibou opened 4 years ago

realkibou commented 4 years ago

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.

AmirGhiasi95 commented 4 years ago

I second this! This script is very useful when you're offline but 720p isn't great for art courses and it's unnecessary for a presentation video. I think the current implementation can be improved upon by setting the quality in the example.py and asking the user to input a class URL.

kallqvist commented 4 years ago

Great idea! Do any of you guys feel up for the task of trying to submit a pull-request for this?

I personally no longer have an active account with skillshare and have no ability to further add any features to this project (or even run it at all to see if it still actually works to be honest...).

As far as I remember the code is currently just picking the first video it's able to download without even looking at the resolution but I don't think it shouldn't be too tricky to make it do something smarter.

AmirGhiasi95 commented 4 years ago

The script is still working fine so it's not a critical issue, just a potential improvement. In all honesty, I would love to contribute but I don't know anything about Python. I'm more of a power-user with some basic coding knowledge.

houdinii commented 4 years ago

I just found this api page in the docs which is where I'm gonna start exploring. I'll probably build this script out a lot if I can get this API figured out. https://cutt.ly/brghtcovAPI

kallqvist commented 4 years ago

Thanks @houdinii I was not even aware these docs existed, surely would have helped to know when I wrote this script some years ago... 😄

houdinii commented 4 years ago

I know they do two free months on a new signup with the referral links https://skl.sh/2AcFCYj if you wanted to jump back in, provided those docs work. I've been through about three different versions of their docs and they are very conflicting and it's hard to tell which products go with which api calls and who has access to which product.

houdinii commented 4 years ago

It looks like different resolutions are handled differently. They are found in the master.m3u8 file linked to in the response. Inside of that is a list of links to each resolution, and finally a list of .ts files in each of those. I have some old scripts for handling IPTV to parse the M3U8 files and I think ffmpeg stitches them back together. I'm sure there is plenty of open source projects that receive m3us and dl them as well.

kallqvist commented 4 years ago

Yeah, that wouldn't surprise me... It was all pretty inconsistent and sometimes random behaviour, a lot of trial end error just to deal with "author name" and other basic fields from skillshares own API too... I've originally tried to keep this script as basic and with as few dependencies as possible just because these inconsistencies you mention. I know there is at least one of the forks that hand the download over to youtube-dl instead but it did so using subprocess and calling CLI commands so I opted to not merge that back into main to not introduce new bugs or more inconsistencies from different versions of tools etc.

I'm sorry, but I'm quite busy with other projects and work right now so don't have the time to really get my hands dirty with this at this time... I'll circle back to this whenever I can since this have been the main feature request for a good while but for now I'm only really able to answer questions etc if/when someone else decides to run with this. Have you seen the skillshare downloader someone wrote in javascript? I'm not sure if that supports different video resolutions either but it might be a place to look for inspiration if so

houdinii commented 4 years ago

I agree with keeping things easy. I believe what I'll do is design a separate module for resolution selection and keep it all air-gapped (for lack of a better word). I set the api up in postman and it works without a hitch, so it should be straight forward. Then it's just a matter of getting a cli tool setup to work as an intermediary. That way it'll be two ways to solve a problem. An easy straight forward one-click mode like it is now, and a second more detailed and time consuming method for customization. Plus it's not destructive and doesn't completely take over your project, lol. On a side note, I've been browsing Github for a decade but never really jumped in, so if I'm stepping on toes, or seem a little misguided, I'm a collaboration noob and probably need pointed in the right direction.

kallqvist commented 4 years ago

Yeah, I like that plan! We can add some extra info to the readme as well with links and such to give a better overview of what options people have. Haha, don't worry about stepping on toes or such! I released the code under MIT license so as far as I'm concerned I haven't really been the "owner" of the code since then. It's kind of out there for whomever to do whatever with permission or not. Some link-backs and mentions are always nice of course but it's not required or even expected. I just happen to be a guy with a bunch of forks on a repo that likes when people keep trying to learn new skills so as long as that is happening in some way, shape or form it's all good with me :D

Feel free to open up some pull-requests (necessary or not) to this repo as well if you want to experiment with how all of that works in github

electroheadfx commented 4 years ago

no luck for have 1080P download ?

04anubhavv commented 3 years ago

Great idea! Do any of you guys feel up for the task of trying to submit a pull-request for this?

I personally no longer have an active account with skillshare and have no ability to further add any features to this project (or even run it at all to see if it still actually works to be honest...).

As far as I remember the code is currently just picking the first video it's able to download without even looking at the resolution but I don't think it shouldn't be too tricky to make it do something smarter.

can I get your email I have something to share

ronyraffoul commented 2 years ago

@04anubhavv is there anything new? are you able to download using your preferred resolution?