Git Product home page Git Product logo

cs-dlp's Introduction

cs-dlp

This is a fork of coursera-dl that works with modern Python and modern coursera.org, with added features and patches.

Introduction

This script makes it easier to batch download lecture resources (e.g., videos, ppt, etc) for Coursera classes. Given one or more class names, it obtains week and class names from the lectures page, and then downloads the related materials into appropriately named files and directories.

This work was originally inspired in part by [youtube-dl][3] by which I've downloaded many other good videos such as those from Khan Academy.

Features

  • Support for all kinds of courses (i.e., "Old Platform"/time-based as well as "New Platform"/on-demand courses).
  • Intentionally detailed names, so that it will display and sort properly on most interfaces (e.g., VLC or MX Video on Android devices).
  • Regex-based section (week) and lecture name filters to download only certain resources.
  • File format extension filter to grab resource types you want.
  • Default arguments loaded from coursera-dl.conf file.
  • Core functionality tested on Linux, Mac and Windows.

Disclaimer

cs-dlp is meant to be used only for your material that Coursera gives you access to download.

We do not encourage any use that violates their Terms Of Use. A relevant excerpt:

"[...] Coursera grants you a personal, non-exclusive, non-transferable license to access and use the Sites. You may download material from the Sites only for your own personal, non-commercial use. You may not otherwise copy, reproduce, retransmit, distribute, publish, commercially exploit or otherwise transfer any material, nor may you modify or create derivatives works of the material."

Installation instructions

cs-dlp requires Python 3 and a Coursera account enrolled in the class of interest.

Note: cs-dlp is not compatible with Python 2.

On any operating system, ensure that the Python executable location is added to your PATH environment variable and, once you have the dependencies installed (see next section), for a basic usage, you will need to invoke the script from the main directory of the project and prepend it with the word python. You can also use more advanced features of the program by looking at the "Running the script" section of this document.

Note: You must already have (manually) agreed to the Honor of Code of the particular courses that you want to use with cs-dlp.

Installing from source

From a command line (preferably, from a virtual environment), simply issue the command:

git clone https://github.com/raffaem/cs-dlp
cd cs-dlp
python -m pip install --user .

Note 1: We strongly recommend that you don't install the package globally on your machine (i.e., with root/administrator privileges), as the installed modules may conflict with other Python applications that you have installed in your system. Prefer to use the option --user to pip install.

ArchLinux

cs-dlp does not currently have an AUR package. Help welcome!

Create an account with Coursera

If you don't already have one, create a [Coursera][1] account and enroll in a class. See https://www.coursera.org/courses for the list of classes.

Authenticating

To authenticate with Coursera, you need a CAUTH cookie.

There are currently two supported ways to do so: you can have cs-dlp get it automatically from your browser, or you can pass one manually.

  1. Automatic way

    1. Open your favorite browser and login into Coursera

    2. Call cs-dlp with --cauth-auto browser option.

      Valid options for browser are:

      • chrome for Google Chrome
      • chromium
      • opera
      • opera_gx
      • brave
      • edge
      • vivaldi
      • firefox
      • librewolf
      • safari
  2. Manual way

    Pass a CAUTH cookie to the --cauth option.

Running the script

Refer to cs-dlp --help for a complete, up-to-date reference on the runtime options supported by this utility.

Run the script to download the materials by providing your Coursera CAUTH cookie, the class names, as well as any additional parameters:

cs-dlp --cauth-auto chrome modelthinking-004

Here are some examples of how to invoke cs-dlp from the command line:

    Multiple classes:            cs-dlp --cauth-auto chrome saas historyofrock1-001 algo-2012-002
    Filter by section name:      cs-dlp --cauth-auto chrome -sf "Chapter_Four" crypto-004
    Filter by lecture name:      cs-dlp --cauth-auto chrome -lf "3.1_" ml-2012-002
    Download only ppt files:     cs-dlp --cauth-auto chrome -f "ppt" qcomp-2012-001
    Get the preview classes:     cs-dlp --cauth-auto chrome -b ni-001
	Download videos at 720p:     cs-dlp --cauth-auto chrome --video-resolution 720p ni-001
    Specify download path:       cs-dlp --cauth-auto chrome --path=C:\Coursera\Classes\ comnetworks-002
    Display help:                cs-dlp --help

    Maintain a list of classes in a dir:
      Initialize:              mkdir -p CURRENT/{class1,class2,..classN}
      Update:                  cs-dlp -n --path CURRENT `\ls CURRENT`

Note: If your ls command is aliased to display a colorized output, you may experience problems. Be sure to escape the ls command (use \ls) to assure that no special characters get sent to the script.

Note that we do support the New Platform ("on-demand") courses.

By default, videos are downloaded at 540p resolution. For on-demand courses, the --video-resolution flag accepts 360p, 540p, and 720p values.

To download just the .txt and/or .srt subtitle files instead of the videos, use --ignore-formats mp4 --subtitle-language en or whatever format the videos are encoded in and desired languages for subtitles.

If you want to store your preferred parameters, create a file named coursera-dl.conf where the script is supposed to be executed, with the following format:

    --subtitle-language en,zh-CN|zh-TW
    --download-quizzes
    #--mathjax-cdn https://cdn.bootcss.com/mathjax/2.7.1/MathJax.js
    # more other parameters

Parameters which are specified in the file will be overriden if they are provided again on the commandline.

Note: In coursera-dl.conf, all the parameters should not be wrapped with quotes.

Resuming downloads

In default mode when you interrupt the download process by pressing CTRL+C, partially downloaded files will be deleted from your disk and you have to start the download process from the beginning. If your download was interrupted by something other than KeyboardInterrupt (CTRL+C) like sudden system crash, partially downloaded files will remain on your disk and the next time you start the process again, these files will be discarded from download list!, therefore it's your job to delete them manually before next start. For this reason we added an option called --resume which continues your downloads from where they stopped:

cs-dlp --cauth-auto chrome --resume sdn1-001

This option can also be used with external downloaders:

cs-dlp --cauth-auto chrome --wget --resume sdn1-001

Note 1: Some external downloaders use their own built-in resume feature which may not be compatible with others, so use them at your own risk.

Note 2: Remember that in resume mode, interrupted files WON'T be deleted from your disk.

Troubleshooting

If you have problems when downloading class materials, please try to see if one of the following actions solve your problem:

  • Make sure the class name you are using corresponds to the resource name used in the URL for that class: https://www.coursera.org/learn/<CLASS_NAME>/home/welcome

  • Have you tried to clean the cached cookies/credentials with the --clear-cache option?

  • Note that many courses (most, perhaps?) may remove the materials after a little while after the course is completed, while other courses may retain the materials up to a next session/offering of the same course (to avoid problems with academic dishonesty, apparently).

    In short, it is not guaranteed that you will be able to download after the course is finished and this is, unfortunately, nothing that we can help you with.

  • One can export a Netscape-style cookies file with a browser extension ([1][9], [2][10]) and use it with the -c option. This comes in handy when the authentication via password is not working (the authentication process changes now and then).

  • For courses that have not started yet, but have had a previous iteration sometimes a preview is available, containing all the classes from the last course. These files can be downloaded by passing the --preview parameter.

  • If you get an error like Could not find class: <CLASS_NAME>, then:

    • Verify that the name of the course is correct. Current class names in coursera are composed by a short course name e.g. class and the current version of the course (a number). For example, for a class named class, you would have to use class-001, class-002 etc.
    • Second, verify that you are enrolled in the course. You won't be able to access the course materials if you are not officially enrolled and agreed to the honor course via the website.

China issues

If you are from China and you're having problems downloading videos, adding "52.84.167.78 d3c33hcgiwev3.cloudfront.net" in the hosts file (/etc/hosts) and freshing DNS with "ipconfig/flushdns" may work (see https://github.com/googlehosts/hosts for more info).

Found 0 sections and 0 lectures on this page

First of all, make sure you are enrolled to the course you want to download.

Many old courses have already closed enrollment so often it's not an option. In this case, try downloading with --preview option. Some courses allow to download lecture materials without enrolling, but it's not common and is not guaranteed to work for every course.

Finally, you can download the videos if you have, at least, the index file that lists all the course materials. Maybe your friend who is enrolled could save that course page for you. In that case use the --process_local_page option.

Alternatively you may want to try this various browser extensions designed for this problem.

If none of the above works for you, there is nothing we can do.

Download timeouts

cs-dlp supports external downloaders but note that they are only used to download materials after the syllabus has been parsed, e.g. videos, PDFs, some handouts and additional files (syllabus is always downloaded using the internal downloader). If you experience problems with downloading such materials, you may want to start using external downloader and configure its timeout values. For example, you can use aria2c downloader by passing --aria option:

cs-dlp --cauth-auto chrome --path . --aria2  <course-name>

And put this into aria2c's configuration file ~/.aria2/aria2.conf to reduce timeouts:

connect-timeout=2
timeout=2
bt-stop-timeout=1

Timeout configuration for internal downloader is not supported.

Windows: proxy support

If you're on Windows behind a proxy, set up the environment variables before running the script as follows:

set HTTP_PROXY=http://host:port
set HTTPS_PROXY=http://host:port

Related discussion: #205

Alternative CDN for MathJax.js

When saving a course page, we enabled MathJax rendering for math equations, by injecting MathJax.js in the header. The script is using a cdn service provided by mathjax.org. However, that url is not accessible in some countries/regions, you can provide a --mathjax-cdn <MATHJAX_CDN> parameter to specify the MathJax.js file that is accessible in your region.

Reporting issues

Before reporting any issue please follow the steps below:

  1. Verify that you are running the latest version of the script

  2. If the problem persists, feel free to open an issue in our bugtracker, please fill the issue template with as much information as possible.

Donations

You can support the project by sponsoring me:

<iframe src="https://github.com/sponsors/raffaem/button" title="Sponsor raffaem" height="32" width="114" style="border: 0; border-radius: 6px;"></iframe>

cs-dlp's People

Contributors

arlimus avatar asiviero avatar azizmb avatar balta2ar avatar charlesbickel avatar felker avatar filosottile avatar github-john-doe avatar iemejia avatar jonasdt avatar jplehmann avatar leonidvasilyev avatar mcarpenter avatar meejah avatar miguelmalvarez avatar moiseslodeiro avatar mxamin avatar opsxcq avatar raffaem avatar rbrito avatar rranelli avatar rsdcastro avatar rteslaru avatar santosh avatar swechha avatar thegoddessinari avatar victorwestmann avatar vladistan avatar vojnovski avatar wiedi 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

cs-dlp's Issues

Download no longer working - unrecognized arguments Course-Name

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!

Not found 404

The program is hanging at the last line "Not Found 404."
Is there any way to exit at this command, or do I need to restart PowerShell to continue running?
Thank you
image

KeyError: 'mp4VideoUrl'

I am having trouble downloading a particular course but it works perfectly fine with other courses.
The course I had issue downloading is data-analysis-and-visualization-with-power-bi.
Can anyone please shine me some lights on how to fix it?

2023-12-21 15:52:35 Traceback (most recent call last):
2023-12-21 15:52:35 File "/usr/local/bin/cs-dlp", line 8, in
2023-12-21 15:52:35 sys.exit(main())
2023-12-21 15:52:35 File "/usr/local/lib/python3.10/dist-packages/cs_dlp/coursera_dl.py", line 283, in main
2023-12-21 15:52:35 error_occurred, completed = download_class(
2023-12-21 15:52:35 File "/usr/local/lib/python3.10/dist-packages/cs_dlp/coursera_dl.py", line 253, in download_class
2023-12-21 15:52:35 return download_on_demand_class(session, args, class_name)
2023-12-21 15:52:35 File "/usr/local/lib/python3.10/dist-packages/cs_dlp/coursera_dl.py", line 173, in download_on_demand_class
2023-12-21 15:52:35 error_occurred, modules = extractor.get_modules(
2023-12-21 15:52:35 File "/usr/local/lib/python3.10/dist-packages/cs_dlp/extractors.py", line 53, in get_modules
2023-12-21 15:52:35 error_occurred, modules = self._parse_on_demand_syllabus(
2023-12-21 15:52:35 File "/usr/local/lib/python3.10/dist-packages/cs_dlp/extractors.py", line 155, in _parse_on_demand_syllabus
2023-12-21 15:52:35 links = course.extract_links_from_lecture(
2023-12-21 15:52:35 File "/usr/local/lib/python3.10/dist-packages/cs_dlp/api.py", line 880, in extract_links_from_lecture
2023-12-21 15:52:35 links = self._extract_videos_and_subtitles_from_lecture(
2023-12-21 15:52:35 File "/usr/local/lib/python3.10/dist-packages/cs_dlp/api.py", line 1044, in _extract_videos_and_subtitles_from_lecture
2023-12-21 15:52:35 videos = VideosV1.from_json(dom)
2023-12-21 15:52:35 File "/usr/local/lib/python3.10/dist-packages/cs_dlp/api.py", line 523, in from_json
2023-12-21 15:52:35 videos = [VideoV1(resolution, links['mp4VideoUrl'])
2023-12-21 15:52:35 File "/usr/local/lib/python3.10/dist-packages/cs_dlp/api.py", line 523, in
2023-12-21 15:52:35 videos = [VideoV1(resolution, links['mp4VideoUrl'])
2023-12-21 15:52:35 KeyError: 'mp4VideoUrl'

[SOLVED] `--username` and `--password` arguments not recognized!

Hi,

I tried to run with coursera-dl.conf file that contained:

--username [email protected]
--password passw0rd
--subtitle-language en
--video-resolution 720p
--download-quizzes True
--download-notebooks True
--cauth COOKIEfromBrowser

But when I run:

cs-dlp --resume --path=./courses coursename

It dies claiming the --username and --password arguments are invalid:

cs-dlp: error: unrecognized arguments: [email protected] --password=passw0rd

Or did I do something wrong?

Unsupported typenames

Describe the bug
Jupyter notebooks not downloading and other assets not downloading. There are unsupported typenames:
-Unsupported typename "ungradedWidget" in lecture "reading-getting-started-with-the-model-asset-exchange-and-the-data-asset"
-Unsupported typename "ungradedLti" in lecture "hands-on-lab-getting-started-with-jupyter-notebooks"
-Unsupported typename "staffGraded" in lecture "final-exam

To Reproduce
cs-dlp -ca YOURCAUTH open-source-tools-for-data-science (--download-notebooks included in conf file)

Expected behavior
Jupyter notebooks and other assets download.

Command not found

Describe the bug
I followed installation instruction but the command cs-dlp is not found.

To Reproduce

  1. activate conda environment
  2. follow installation instruction and run:
git clone https://github.com/raffaem/cs-dlp
cd cs-dlp
pip install --user .
  1. run cs-dlp:
zsh: command not found: cs-dlp

Expected behavior
It should execute. The package is indeed installed and it does run when I run python main.py. I don't know if this is an error in the code, documentation or my virtual environment setup.

I checked the bin folder of my conda environment (/opt/homebrew/Caskroom/miniconda/base/envs/my_env_name/bin) and indeed cs-dlp is not in the folder.

Desktop (please complete the following information):

  • OS: macOS 14.0 (23A344)
  • Python 3.9.5
  • conda 4.9.2

Error

py 13.12 also tried with 11, 9

note working for me

C:\sat\cs-dlp>cs-dlp --cauth-auto chrome XXXX
'cs_dlp' is not recognized as an internal or external command,
operable program or batch file.

Please help me on this, I need a course to download which is rare

if it works for anyone kindly post Python version git version ...and every step please

"Error 403 Client Error" when attempting to download quizzes

When I run the command cs-dlp --cauth-auto firefox --subtitle-language en --download-quizzes algebra-i, the course videos and subtitles download just fine, but when the program tries downloading the exams/quizzes, it prints Error 403 Client Error. Am I missing something? My laptop is running Debian sid.

$ cs-dlp --cauth-auto firefox --subtitle-language en --download-quizzes algebra-i
coursera_dl version 0.12.0b0
Downloading class: algebra-i (1 / 1)
Parsing syllabus of on-demand course (id=TWNon2r-Eeumww4A4k-nvw). This may take some time, please be patient ...
Processing module  module-1-the-structure-of-numbers
Processing section     lesson-1-real-numbers
Processing lecture         real-numbers (lecture)
Processing lecture         notes-common-sets-of-numbers (supplement)
Processing lecture         sample-problems-real-numbers (supplement)
Processing lecture         structure-of-numbers (exam)
Error 403 Client Error: Forbidden for url: https://api.coursera.org/api/onDemandExamSessions.v1 getting page https://api.coursera.org/api/onDemandExamSessions.v1
The server replied: {"errorCode":"Not Authorized","message":null,"details":null}
Could not download exam eQuAo: 403 Client Error: Forbidden for url: https://api.coursera.org/api/onDemandExamSessions.v1
Processing section     lesson-2-properties-of-real-numbers
Processing lecture         properties-of-real-numbers (lecture)
Processing lecture         notes-operations (supplement)
Processing lecture         notes-working-with-fractions (supplement)
Processing lecture         sample-problems-properties-of-real-numbers (supplement)
Processing lecture         properties-of-real-numbers (exam)
Error 403 Client Error: Forbidden for url: https://api.coursera.org/api/onDemandExamSessions.v1 getting page https://api.coursera.org/api/onDemandExamSessions.v1
The server replied: {"errorCode":"Not Authorized","message":null,"details":null}
Could not download exam pQm5a: 403 Client Error: Forbidden for url: https://api.coursera.org/api/onDemandExamSessions.v1
Processing module  module-2-linear-equations
Processing section     lesson-1-linear-equations-in-one-variable
...
$

Cannot Log In? HTTPError: 400 Client Error: Bad Request for url

I cannot seem to get this to work, with the master branch as well as this one. I keep getting this error, but I've triple checked the login info and it's all good. I have tried using -n for the .netrc file as well as doing the -u -p option. What is going on? ChatGPT was helpful up until this point, we cannot seem to find a work around and I've been at this for HOURS.

C:\Users\CatalystNovus>coursera-dl applying-project-management -n
coursera_dl version 0.11.5
Traceback (most recent call last):
File "c:\users\catalystnovus.pyenv\pyenv-win\versions\3.8.10\lib\site-packages\coursera\cookies.py", line 148, in login
r.raise_for_status()
File "c:\users\catalystnovus.pyenv\pyenv-win\versions\3.8.10\lib\site-packages\requests\models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.coursera.org/api/login/v3

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\users\catalystnovus.pyenv\pyenv-win\versions\3.8.10\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\catalystnovus.pyenv\pyenv-win\versions\3.8.10\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\CatalystNovus.pyenv\pyenv-win\versions\3.8.10\Scripts\coursera-dl.exe_main
.py", line 7, in
File "c:\users\catalystnovus.pyenv\pyenv-win\versions\3.8.10\lib\site-packages\coursera\coursera_dl.py", line 239, in main
login(session, args.username, args.password)
File "c:\users\catalystnovus.pyenv\pyenv-win\versions\3.8.10\lib\site-packages\coursera\cookies.py", line 155, in login
raise AuthenticationFailed('Cannot login on coursera.org: %s' % e)
coursera.cookies.AuthenticationFailed: Cannot login on coursera.org: 400 Client Error: Bad Request for url: https://api.coursera.org/api/login/v3

Desktop (please complete the following information):

  • OS: Windows (Dual Boot with QubesOS on a separate drive)
  • Browser Firefox
  • Dell OptiPlex 7020 + AMD RX340 + 240GB NVMe m.2 through PCIe adaptor

ImportError: cannot import name 'HTMLParseError' from 'html.parser'

ImportError: cannot import name 'HTMLParseError' from 'html.parser':

Last login: Mon Aug 14 19:43:49 on ttys000 User ~ % git clone https://github.com/raffaem/cs-dlp Cloning into 'cs-dlp'... remote: Enumerating objects: 4684, done. remote: Counting objects: 100% (233/233), done. remote: Compressing objects: 100% (115/115), done. remote: Total 4684 (delta 139), reused 197 (delta 117), pack-reused 4451 Receiving objects: 100% (4684/4684), 1.84 MiB | 1.08 MiB/s, done. Resolving deltas: 100% (2773/2773), done. user ~ % cd cs-dlp user cs-dlp % pip install --user . zsh: command not found: pip user cs-dlp % pip3 install --user . Processing /Users/user/cs-dlp Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Requirement already satisfied: attrs>=18.1.0 in /Users/user/Library/Python/3.9/lib/python/site-packages (from cs-dlp==0.12.0b0) (18.1.0) Requirement already satisfied: beautifulsoup4>=4.1.3 in /Users/user/Library/Python/3.9/lib/python/site-packages (from cs-dlp==0.12.0b0) (4.1.3) Requirement already satisfied: browser-cookie3>=0.19.0 in /Users/user/Library/Python/3.9/lib/python/site-packages (from cs-dlp==0.12.0b0) (0.19.1) Requirement already satisfied: configargparse>=0.12.0 in /Users/user/Library/Python/3.9/lib/python/site-packages (from cs-dlp==0.12.0b0) (1.5.3) Requirement already satisfied: pyasn1>=0.1.7 in /Users/user/Library/Python/3.9/lib/python/site-packages (from cs-dlp==0.12.0b0) (0.5.0) Requirement already satisfied: requests>=2.20 in /Users/user/Library/Python/3.9/lib/python/site-packages (from cs-dlp==0.12.0b0) (2.31.0) Requirement already satisfied: urllib3>=1.23 in /Users/user/Library/Python/3.9/lib/python/site-packages (from cs-dlp==0.12.0b0) (2.0.3) Requirement already satisfied: lz4 in /Users/user/Library/Python/3.9/lib/python/site-packages (from browser-cookie3>=0.19.0->cs-dlp==0.12.0b0) (4.3.2) Requirement already satisfied: pycryptodomex in /Users/user/Library/Python/3.9/lib/python/site-packages (from browser-cookie3>=0.19.0->cs-dlp==0.12.0b0) (3.18.0) Requirement already satisfied: charset-normalizer<4,>=2 in /Users/user/Library/Python/3.9/lib/python/site-packages (from requests>=2.20->cs-dlp==0.12.0b0) (3.1.0) Requirement already satisfied: idna<4,>=2.5 in /Users/user/Library/Python/3.9/lib/python/site-packages (from requests>=2.20->cs-dlp==0.12.0b0) (3.4) Requirement already satisfied: certifi>=2017.4.17 in /Users/user/Library/Python/3.9/lib/python/site-packages (from requests>=2.20->cs-dlp==0.12.0b0) (2023.5.7) Building wheels for collected packages: cs-dlp Building wheel for cs-dlp (pyproject.toml) ... done Created wheel for cs-dlp: filename=cs_dlp-0.12.0b0-py2.py3-none-any.whl size=62981 sha256=0c107655acf909f6246af496ae547f858ae71a15d286e0ced48561e5edf94db4 Stored in directory: /Users/user/Library/Caches/pip/wheels/59/08/6d/49be50f7d78124cb8f845e3f02fe03d889293becee316d0ed2 Successfully built cs-dlp Installing collected packages: cs-dlp Attempting uninstall: cs-dlp Found existing installation: cs-dlp 0.12.0b0 Uninstalling cs-dlp-0.12.0b0: Successfully uninstalled cs-dlp-0.12.0b0 WARNING: The script cs-dlp is installed in '/Users/user/Library/Python/3.9/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed cs-dlp-0.12.0b0 user cs-dlp % /Users/user/Library/Python/3.9/bin/cs-dlp --cauth-auto safari modelthinking-004 Traceback (most recent call last): File "/Users/user/Library/Python/3.9/bin/cs-dlp", line 5, in <module> from cs_dlp.coursera_dl import main File "/Users/user/Library/Python/3.9/lib/python/site-packages/cs_dlp/coursera_dl.py", line 57, in <module> import bs4 File "/Users/user/Library/Python/3.9/lib/python/site-packages/bs4/__init__.py", line 29, in <module> from .builder import builder_registry File "/Users/user/Library/Python/3.9/lib/python/site-packages/bs4/builder/__init__.py", line 303, in <module> from . import _htmlparser File "/Users/user/Library/Python/3.9/lib/python/site-packages/bs4/builder/_htmlparser.py", line 7, in <module> from html.parser import ( ImportError: cannot import name 'HTMLParseError' from 'html.parser' (/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/html/parser.py) user cs-dlp %

Desktop:

  • OS: macOS 13.4.1
  • Browser safari
  • Version 16.5.2
  • Python Version - 3.9.6

Course Unsupported or Human Error

Trying to download foundations-of-digital-marketing-and-e-commerce but receiving the error:

cs-dlp: error: unrecognized arguments: foundations-of-digital-marketing-and-e-commerce

command used that produced error:

cs-dlp --cauth-auto chrome foundations-of-digital-marketing-and-e-commerce

ModuleNotFoundError: No module named 'main'

According to the documentation, when executing the command "cs-dlp --cauth-auto chrome ........," the following error is reported:

Traceback (most recent call last):
File "E:\Soft\anaconda3\envs\Coursera\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "E:\Soft\anaconda3\envs\Coursera\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\HouseLiang\AppData\Roaming\Python\Python39\Scripts\cs-dlp.exe\__main__.py", line 4, in
ModuleNotFoundError: No module named 'main'

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.