raffaem / cs-dlp

Script for downloading Coursera.org videos and naming them.
GNU Lesser General Public License v3.0
306 stars 49 forks source link

Download no longer working - unrecognized arguments Course-Name #23

Closed yuvalbeck closed 9 months ago

yuvalbeck commented 9 months ago

Download is no longer working, the course name is not being recognized:

xxxxxxx@MacBook-Air bin % /Users/xxxxxxx/Library/Python/3.9/bin/cs-dlp cs-dlp --cauth-auto safari --path=/Users/xxxxxxx/Downloads/Coursera/Classes/  --subtitle-language en gmba8033              
/Users/yuvalbeck/Library/Python/3.9/lib/python/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
usage: cs-dlp [-h] [--jobs JOBS] [--download-delay DOWNLOAD_DELAY] [-b] [--path PATH] [-sl SUBTITLE_LANGUAGE] [--specialization] [--only-syllabus] [--download-quizzes] [--download-notebooks] [--about]
              [-f FILE_FORMATS] [--ignore-formats IGNORE_FORMATS] [-sf SECTION_FILTER] [-lf LECTURE_FILTER] [-rf RESOURCE_FILTER] [--video-resolution VIDEO_RESOLUTION] [--disable-url-skipping]
              [--wget [WGET]] [--curl [CURL]] [--aria2 [ARIA2]] [--axel [AXEL]] [--downloader-arguments DOWNLOADER_ARGUMENTS] [--list-courses] [--resume] [-o] [--verbose-dirs] [--quiet] [-r]
              [--combined-section-lectures-nums] [--unrestricted-filenames] [-ca COOKIES_CAUTH] [-caa BROWSER] [-c COOKIES_FILE] [--clear-cache] [--hook HOOKS] [-pl] [--mathjax-cdn MATHJAX_CDN_URL]
              [--skip-download] [--debug] [--cache-syllabus] [--version] [-l LOCAL_PAGE]
              [class_names ...]
cs-dlp: error: unrecognized arguments: gmba8033

Although found in the courses list:

xxxxxxx@MacBook-Air bin % /Users/xxxxxx/Library/Python/3.9/bin/cs-dlp cs-dlp --cauth-auto safari --list-courses
/Users/xxxxxxx/Library/Python/3.9/lib/python/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
coursera_dl version 0.12.0b0
Listing enrolled courses
Found 2 courses
gmba8034
gmba8033

Python: 3.9.6 OS: macOS 14.2.1

Beleive related to #19 @raffaem can you please help in this matter?

Thank you!

yuvalbeck commented 9 months ago

Without adding the script to PATH it will not properly work. it is now fixed. on macOS:

  1. Open Terminal.

  2. Determine which shell you are using: You can do this by typing echo $SHELL.

    • If it returns something like /bin/zsh, you are using zsh (common in newer macOS versions).
    • If it returns /bin/bash, you're using bash.
  3. Edit the Appropriate Profile File:

    • For bash, you'll edit ~/.bash_profile or ~/.bashrc.
    • For zsh, you'll edit ~/.zshrc.

    Use a text editor to open the file, for example, type nano ~/.zshrc or nano ~/.bash_profile in the terminal.

  4. Add the Path to the Profile File:

    Add the following line to the end of the file: export PATH="<the location of the installed script>:$PATH" This command adds the script to the PATH.

  5. Save the File and Exit the Editor: In nano, you can do this by pressing Ctrl + O, Enter to save, and then Ctrl + X to exit.

  6. Reload the Profile:

    To apply the changes, either restart the terminal or source the profile file with source ~/.zshrc or source ~/.bash_profile, depending on your shell.

  7. Verify the Installation:

    Type cs-dlp --version or a similar command in the terminal to ensure the script is now accessible from any directory.