ozonostudio / skillshare

Script to download classes videos to view offline
MIT License
5 stars 0 forks source link

NameError: name 'unicode' is not defined #3

Closed mslmn closed 1 year ago

mslmn commented 1 year ago

Installed on Mac with pip and added cookies. Getting this error when running down command. NameError: name 'unicode' is not defined

mslmn commented 1 year ago

I don't have any spaces at the start and end. My cookies string is very long and starts with device_session_id and ends with access_token_expiration_time=1694538820. I'm using only the class ID.

mslmn commented 1 year ago

Full error

Traceback (most recent call last):
  File "/usr/local/bin/down", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/skillshare_downloader/main.py", line 130, in main
    dl.download(class_id=args.id, language=args.s, resolution=args.r, telegram=args.t, erase=args.e)
  File "/usr/local/lib/python3.11/site-packages/skillshare_downloader/skillshare.py", line 122, in download
    slugify(teacher_name),
    ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/slugify.py", line 24, in slugify
    unicode(
    ^^^^^^^
NameError: name 'unicode' is not defined
mslmn commented 1 year ago

error seems to be solved by running

pip3 uninstall slugify
pip3 install python-slugify

Although now I've noticed if a video has no subtitles the tool will error out and not process it FileNotFoundError: [Errno 2] No such file or directory: 'subtitles.srt'