Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tested in local and it now works #42

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dl.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import sys, os
from skillshare import Skillshare, splash
from magic import cookie

# or by class ID:
# dl.download_course_by_class_id(189505397)

def main():
dl = Skillshare(cookie)
dl = Skillshare("PHPSESSID=YOUR_PHPSESSID_HERE")
course_url = sys.argv[1]
dl.download_course_by_url(course_url)
#dl.download_course_by_url(course_url)
dl.download_course_by_class_id(course_url)


if __name__ == "__main__":
Expand Down
Binary file removed magic.pyc
Binary file not shown.
2 changes: 2 additions & 0 deletions skillshare.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ def download_course_by_class_id(self, class_id):
video_id = None
if 'video_hashed_id' in s and s['video_hashed_id']:
video_id = s['video_hashed_id'].split(':')[1]
elif 'video_thumbnail_url' in s and s['video_thumbnail_url']:
video_id = s['video_thumbnail_url'].split('/')[6]

if not video_id:
raise Exception('Failed to read video ID from data')
Expand Down