Giter VIP home page Giter VIP logo

Comments (2)

agsax2020 avatar agsax2020 commented on June 5, 2024

It might be the same issue I encountered today. I fixed it by installing a forked version of coursera-dl (see #834 (comment)) that addresses a recent change in the Coursera API endpoints. Seems that Coursera recently deprecated their v1 endpoints that this tool uses.

from coursera-dl.

zenny avatar zenny commented on June 5, 2024

It might be the same issue I encountered today. I fixed it by installing a forked version of coursera-dl (see #834 (comment)) that addresses a recent change in the Coursera API endpoints. Seems that Coursera recently deprecated their v1 endpoints that this tool uses.

Thanks. But that did not solved the issue.

Now I get:

$ ./coursera-dl --resume --path=../Specialization/online-learning-design-eduators '-dyslexia'
/home/zenny/Downloads/Education/coursera/my-coursera/coursera-dl-v2/coursera/api.py:947: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if extension is '':
/home/zenny/Downloads/Education/coursera/my-coursera/coursera-dl-v2/coursera/api.py:1592: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if extension is '':
usage: coursera-dl [-h] [-u USERNAME] [-p PASSWORD] [--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] [-c COOKIES_FILE] [-n [NETRC]] [-k]
                   [--clear-cache] [--hook HOOKS] [-pl]
                   [--mathjax-cdn MATHJAX_CDN_URL] [--skip-download] [--debug]
                   [--cache-syllabus] [--version] [-l LOCAL_PAGE]
                   [class_names ...]

Without the full url of the course

$ ./coursera-dl --resume --path=../Specialization/online-learning-design-eduators "https://www.coursera.org/learn/-dyslexia"
coursera_dl version 0.11.5
Downloading class: https://www.coursera.org/learn/-dyslexia (1 / 1)
Error 400 Client Error: Bad Request for url: https://api.coursera.org/api/onDemandCourseMaterials.v2/?q=slug&slug=https://www.coursera.org/learn/-dyslexia&includes=modules%2Clessons%2CpassableItemGroups%2CpassableItemGroupChoices%2CpassableLessonElements%2Citems%2Ctracks%2CgradePolicy&&fields=moduleIds%2ConDemandCourseMaterialModules.v1(name%2Cslug%2Cdescription%2CtimeCommitment%2ClessonIds%2Coptional%2ClearningObjectives)%2ConDemandCourseMaterialLessons.v1(name%2Cslug%2CtimeCommitment%2CelementIds%2Coptional%2CtrackId)%2ConDemandCourseMaterialPassableItemGroups.v1(requiredPassedCount%2CpassableItemGroupChoiceIds%2CtrackId)%2ConDemandCourseMaterialPassableItemGroupChoices.v1(name%2Cdescription%2CitemIds)%2ConDemandCourseMaterialPassableLessonElements.v1(gradingWeight%2CisRequiredForPassing)%2ConDemandCourseMaterialItems.v2(name%2Cslug%2CtimeCommitment%2CcontentSummary%2CisLocked%2ClockableByItem%2CitemLockedReasonCode%2CtrackId%2ClockedStatus%2CitemLockSummary)%2ConDemandCourseMaterialTracks.v1(passablesCount)&showLockedItems=true getting page https://api.coursera.org/api/onDemandCourseMaterials.v2/?q=slug&slug=https://www.coursera.org/learn/-dyslexia&includes=modules%2Clessons%2CpassableItemGroups%2CpassableItemGroupChoices%2CpassableLessonElements%2Citems%2Ctracks%2CgradePolicy&&fields=moduleIds%2ConDemandCourseMaterialModules.v1(name%2Cslug%2Cdescription%2CtimeCommitment%2ClessonIds%2Coptional%2ClearningObjectives)%2ConDemandCourseMaterialLessons.v1(name%2Cslug%2CtimeCommitment%2CelementIds%2Coptional%2CtrackId)%2ConDemandCourseMaterialPassableItemGroups.v1(requiredPassedCount%2CpassableItemGroupChoiceIds%2CtrackId)%2ConDemandCourseMaterialPassableItemGroupChoices.v1(name%2Cdescription%2CitemIds)%2ConDemandCourseMaterialPassableLessonElements.v1(gradingWeight%2CisRequiredForPassing)%2ConDemandCourseMaterialItems.v2(name%2Cslug%2CtimeCommitment%2CcontentSummary%2CisLocked%2ClockableByItem%2CitemLockedReasonCode%2CtrackId%2ClockedStatus%2CitemLockSummary)%2ConDemandCourseMaterialTracks.v1(passablesCount)&showLockedItems=true
The server replied: {"msg":"Routing error: Improperly formatted value for parameter 'slug'"}
HTTPError 400 Client Error: Bad Request for url: https://api.coursera.org/api/onDemandCourseMaterials.v2/?q=slug&slug=https://www.coursera.org/learn/-dyslexia&includes=modules%2Clessons%2CpassableItemGroups%2CpassableItemGroupChoices%2CpassableLessonElements%2Citems%2Ctracks%2CgradePolicy&&fields=moduleIds%2ConDemandCourseMaterialModules.v1(name%2Cslug%2Cdescription%2CtimeCommitment%2ClessonIds%2Coptional%2ClearningObjectives)%2ConDemandCourseMaterialLessons.v1(name%2Cslug%2CtimeCommitment%2CelementIds%2Coptional%2CtrackId)%2ConDemandCourseMaterialPassableItemGroups.v1(requiredPassedCount%2CpassableItemGroupChoiceIds%2CtrackId)%2ConDemandCourseMaterialPassableItemGroupChoices.v1(name%2Cdescription%2CitemIds)%2ConDemandCourseMaterialPassableLessonElements.v1(gradingWeight%2CisRequiredForPassing)%2ConDemandCourseMaterialItems.v2(name%2Cslug%2CtimeCommitment%2CcontentSummary%2CisLocked%2ClockableByItem%2CitemLockedReasonCode%2CtrackId%2ClockedStatus%2CitemLockSummary)%2ConDemandCourseMaterialTracks.v1(passablesCount)&showLockedItems=true

So the API version is no issue, but the leading '-' is!

from coursera-dl.

Related Issues (20)

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.