-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coursera-dl worked and now stops with an 404 error on the same class #835
Comments
Same issue on MacOs Monterey 12.6 |
Note, the version 1 API (onDemandCourseMaterials.v1) has been deprecated as noted here: #834 The coursera-dl code will need to be updated to use version 2 of the API, assuming it provides similar required functionality. |
same issue:( , waiting for coursera-dl code to be updated |
A working solution has been posted here: #834 (comment) |
my fork implements those solutions |
Yes, @raffaem 's fork did work for me too. Thanks. I spent over an hour trying to figure this out. Can someone copy that fork over to the main branch so that other people are saved the frustration? I'm not sure how to do it myself, but just wanted to +1 this solution. |
@raffaem Thanks for making a fork. It seemed to work alright until today when I tried to download something. Could you please confirm if it's still working alright for you? |
Yes it's still working for me. Remember to authenticate through CAUTH cookies and use the slug of the course, not the full URL. |
@raffaem Thanks for your fix. Just checked and it works. Was wondering if you'd like to rebase and maybe create a pull request? Looks like this repository is not maintained as much, maybe the owner accepts your pr! |
@raffaem Thank you |
Unfortunately, Even this fork isn't working as of now :( @SG75 please let me know if it is still working because I couldn't do it This is the error I get
|
馃毃Please review the Troubleshooting section
before reporting any issue. Don't forget to check also the current issues to
avoid duplicates.
Subject of the issue
Describe your issue here.
I was able to download via coursera-dl, then I tried another class and it stopped working. I tried to download the previous one and it also stopped working giving me 404 error.
Your environment
Steps to reproduce
Tell us how to reproduce this issue, please don't forget to include
enough information so that you can help us help you:
file
requirements.txt
. yesyour username and password, but leave all other information untouched). coursera-dl deep-learning-reinforcement-learning (I use the conf file)
--debug
option before posting the messages as a bug report. Please, copy and paste
them. Don't reword/paraphrase the messages.
Expected behaviour
Tell us what should happen.
Download the class.
Actual behaviour
Tell us what happens instead. If the script fails, please copy the entire
output of the command or the stacktrace (don't forget to obfuscate your
username and password). If you cannot copy the exception, attach a screenshot.
root[main] coursera_dl version 0.11.5
root[main] Downloading class: deep-learning-reinforcement-learning (1 / 1)
root[download_class] Downloading new style (on demand) class deep-learning-reinforcement-learning
urllib3.connectionpool[_new_conn] Starting new HTTPS connection (1): api.coursera.org:443
urllib3.connectionpool[_make_request] https://api.coursera.org:443 "GET /api/onDemandCourseMaterials.v2/?q=slug&slug=deep-learning-reinforcement-learning&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 HTTP/1.1" 200 None
root[_get_on_demand_syllabus] Downloaded https://api.coursera.org/api/onDemandCourseMaterials.v2/?q=slug&slug=deep-learning-reinforcement-learning&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 (42461 bytes)
root[_parse_on_demand_syllabus] Parsing syllabus of on-demand course (id=1yKR1Yl0EeqKfAqPxEaZaQ). This may take some time, please be patient ...
urllib3.connectionpool[_make_request] https://api.coursera.org:443 "GET /api/memberships.v1?includes=courseId,courses.v1&q=me&showHidden=true&filter=current,preEnrolled HTTP/1.1" 200 312
urllib3.connectionpool[_make_request] https://api.coursera.org:443 "GET /api/onDemandCourseMaterials.v1/?q=slug&slug=deep-learning-reinforcement-learning&includes=moduleIds%2ClessonIds%2CpassableItemGroups%2CpassableItemGroupChoices%2CpassableLessonElements%2CitemIds%2Ctracks&fields=moduleIds%2ConDemandCourseMaterialModules.v1(name%2Cslug%2Cdescription%2CtimeCommitment%2ClessonIds%2Coptional)%2ConDemandCourseMaterialLessons.v1(name%2Cslug%2CtimeCommitment%2CelementIds%2Coptional%2CtrackId)%2ConDemandCourseMaterialPassableItemGroups.v1(requiredPassedCount%2CpassableItemGroupChoiceIds%2CtrackId)%2ConDemandCourseMaterialPassableItemGroupChoices.v1(name%2Cdescription%2CitemIds)%2ConDemandCourseMaterialPassableLessonElements.v1(gradingWeight)%2ConDemandCourseMaterialItems.v1(name%2Cslug%2CtimeCommitment%2Ccontent%2CisLocked%2ClockableByItem%2CitemLockedReasonCode%2CtrackId)%2ConDemandCourseMaterialTracks.v1(passablesCount)&showLockedItems=true HTTP/1.1" 404 None
root[get_reply] Error 404 Client Error: Not Found for url: https://api.coursera.org/api/onDemandCourseMaterials.v1/?q=slug&slug=deep-learning-reinforcement-learning&includes=moduleIds%2ClessonIds%2CpassableItemGroups%2CpassableItemGroupChoices%2CpassableLessonElements%2CitemIds%2Ctracks&fields=moduleIds%2ConDemandCourseMaterialModules.v1(name%2Cslug%2Cdescription%2CtimeCommitment%2ClessonIds%2Coptional)%2ConDemandCourseMaterialLessons.v1(name%2Cslug%2CtimeCommitment%2CelementIds%2Coptional%2CtrackId)%2ConDemandCourseMaterialPassableItemGroups.v1(requiredPassedCount%2CpassableItemGroupChoiceIds%2CtrackId)%2ConDemandCourseMaterialPassableItemGroupChoices.v1(name%2Cdescription%2CitemIds)%2ConDemandCourseMaterialPassableLessonElements.v1(gradingWeight)%2ConDemandCourseMaterialItems.v1(name%2Cslug%2CtimeCommitment%2Ccontent%2CisLocked%2ClockableByItem%2CitemLockedReasonCode%2CtrackId)%2ConDemandCourseMaterialTracks.v1(passablesCount)&showLockedItems=true getting page https://api.coursera.org/api/onDemandCourseMaterials.v1/?q=slug&slug=deep-learning-reinforcement-learning&includes=moduleIds%2ClessonIds%2CpassableItemGroups%2CpassableItemGroupChoices%2CpassableLessonElements%2CitemIds%2Ctracks&fields=moduleIds%2ConDemandCourseMaterialModules.v1(name%2Cslug%2Cdescription%2CtimeCommitment%2ClessonIds%2Coptional)%2ConDemandCourseMaterialLessons.v1(name%2Cslug%2CtimeCommitment%2CelementIds%2Coptional%2CtrackId)%2ConDemandCourseMaterialPassableItemGroups.v1(requiredPassedCount%2CpassableItemGroupChoiceIds%2CtrackId)%2ConDemandCourseMaterialPassableItemGroupChoices.v1(name%2Cdescription%2CitemIds)%2ConDemandCourseMaterialPassableLessonElements.v1(gradingWeight)%2ConDemandCourseMaterialItems.v1(name%2Cslug%2CtimeCommitment%2Ccontent%2CisLocked%2ClockableByItem%2CitemLockedReasonCode%2CtrackId)%2ConDemandCourseMaterialTracks.v1(passablesCount)&showLockedItems=true
root[get_reply] The server replied:
<title>Coursera - API Route Does Not Exist</title>
API Route Does Not Exist
Edge does not know about this API route.
Check whether this route is exposed in the routing table.
root[main] HTTPError 404 Client Error: Not Found for url: https://api.coursera.org/api/onDemandCourseMaterials.v1/?q=slug&slug=deep-learning-reinforcement-learning&includes=moduleIds%2ClessonIds%2CpassableItemGroups%2CpassableItemGroupChoices%2CpassableLessonElements%2CitemIds%2Ctracks&fields=moduleIds%2ConDemandCourseMaterialModules.v1(name%2Cslug%2Cdescription%2CtimeCommitment%2ClessonIds%2Coptional)%2ConDemandCourseMaterialLessons.v1(name%2Cslug%2CtimeCommitment%2CelementIds%2Coptional%2CtrackId)%2ConDemandCourseMaterialPassableItemGroups.v1(requiredPassedCount%2CpassableItemGroupChoiceIds%2CtrackId)%2ConDemandCourseMaterialPassableItemGroupChoices.v1(name%2Cdescription%2CitemIds)%2ConDemandCourseMaterialPassableLessonElements.v1(gradingWeight)%2ConDemandCourseMaterialItems.v1(name%2Cslug%2CtimeCommitment%2Ccontent%2CisLocked%2ClockableByItem%2CitemLockedReasonCode%2CtrackId)%2ConDemandCourseMaterialTracks.v1(passablesCount)&showLockedItems=true root[main] HTTPError 404 Client Error: Not Found for url: https://api.coursera.org/api/onDemandCourseMaterials.v1/?q=slug&slug=deep-learning-reinforcement-learning&includes=moduleIds%2ClessonIds%2CpassableItemGroups%2CpassableItemGroupChoices%2CpassableLessonElements%2CitemIds%2Ctracks&fields=moduleIds%2ConDemandCourseMaterialModules.v1(name%2Cslug%2Cdescription%2CtimeCommitment%2ClessonIds%2Coptional)%2ConDemandCourseMaterialLessons.v1(name%2Cslug%2CtimeCommitment%2CelementIds%2Coptional%2CtrackId)%2ConDemandCourseMaterialPassableItemGroups.v1(requiredPassedCount%2CpassableItemGroupChoiceIds%2CtrackId)%2ConDemandCourseMaterialPassableItemGroupChoices.v1(name%2Cdescription%2CitemIds)%2ConDemandCourseMaterialPassableLessonElements.v1(gradingWeight)%2ConDemandCourseMaterialItems.v1(name%2Cslug%2CtimeCommitment%2Ccontent%2CisLocked%2ClockableByItem%2CitemLockedReasonCode%2CtrackId)%2ConDemandCourseMaterialTracks.v1(passablesCount)&showLockedItems=true Traceback (most recent call last): File "C:\Users\sacha\Desktop\Python\Lib\site-packages\coursera\coursera_dl.py", line 247, in main error_occurred, completed = download_class( ^^^^^^^^^^^^^^^ File "C:\Users\sacha\Desktop\Python\Lib\site-packages\coursera\coursera_dl.py", line 214, in download_class return download_on_demand_class(session, args, class_name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sacha\Desktop\Python\Lib\site-packages\coursera\coursera_dl.py", line 134, in download_on_demand_class error_occurred, modules = extractor.get_modules( ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sacha\Desktop\Python\Lib\site-packages\coursera\extractors.py", line 53, in get_modules error_occurred, modules = self._parse_on_demand_syllabus( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sacha\Desktop\Python\Lib\site-packages\coursera\extractors.py", line 105, in _parse_on_demand_syllabus ondemand_material_items = OnDemandCourseMaterialItemsV1.create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sacha\Desktop\Python\Lib\site-packages\coursera\api.py", line 318, in create dom = get_page(session, OPENCOURSE_ONDEMAND_COURSE_MATERIALS, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sacha\Desktop\Python\Lib\site-packages\coursera\network.py", line 91, in get_page reply = get_reply(session, url, post=post, data=data, headers=headers, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\sacha\Desktop\Python\Lib\site-packages\coursera\network.py", line 51, in get_reply reply.raise_for_status() File "C:\Users\sacha\Desktop\Python\Lib\site-packages\requests\models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.coursera.org/api/onDemandCourseMaterials.v1/?q=slug&slug=deep-learning-reinforcement-learning&includes=moduleIds%2ClessonIds%2CpassableItemGroups%2CpassableItemGroupChoices%2CpassableLessonElements%2CitemIds%2Ctracks&fields=moduleIds%2ConDemandCourseMaterialModules.v1(name%2Cslug%2Cdescription%2CtimeCommitment%2ClessonIds%2Coptional)%2ConDemandCourseMaterialLessons.v1(name%2Cslug%2CtimeCommitment%2CelementIds%2Coptional%2CtrackId)%2ConDemandCourseMaterialPassableItemGroups.v1(requiredPassedCount%2CpassableItemGroupChoiceIds%2CtrackId)%2ConDemandCourseMaterialPassableItemGroupChoices.v1(name%2Cdescription%2CitemIds)%2ConDemandCourseMaterialPassableLessonElements.v1(gradingWeight)%2ConDemandCourseMaterialItems.v1(name%2Cslug%2CtimeCommitment%2Ccontent%2CisLocked%2ClockableByItem%2CitemLockedReasonCode%2CtrackId)%2ConDemandCourseMaterialTracks.v1(passablesCount)&showLockedItems=true
The text was updated successfully, but these errors were encountered: