我正在尝试在 Windows 中使用 coursera-dl 使用以下命令下载 coursera 视频:
coursera-dl neural-networks-deep-learning
它给出了这个错误:
coursera_dl version 0.11.5
Downloading class: neural-networks-deep-learning (1 / 1)
Parsing syllabus of on-demand course (id=W_mOXCrdEeeNPQ68_4aPpA). This may take some time, please be patient ...
Error 404 Client Error: Not Found for url: https://api.coursera.org/api/onDemandCourseMaterials.v1/?q=slug&slug=neural-networks-deep-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=neural-networks-deep-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 server replied: <html>
<head>
<title>Coursera - API Route Does Not Exist</title>
</head>
<body style="background-color:#e4e4e4">
<div style="position:absolute; top:0; bottom:0; left:0; right:0; margin:auto; height:200px; width: 600px">
<div style="text-align:center">
<img src="https://s3.amazonaws.com/coursera/error_pages/coursera-logo.svg" width="400">
</div>
<h1 style="text-align:center; font-family:Helvetica, Arial, sans-serif; font-weight:100; color: #555">
API Route Does Not Exist
</h1>
<div style="text-align:center; font-family:Helvetica, Arial, sans-serif; font-weight:300; font-size:13pt; color: #555">
Edge does not know about this API route. <br>
Check whether this route is exposed in the routing table.
</div>
</div>
</body>
</html>
HTTPError 404 Client Error: Not Found for url: https://api.coursera.org/api/onDemandCourseMaterials.v1/?q=slug&slug=neural-networks-deep-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
有什么想法吗?
您分享的错误似乎与该工具的 GitHub 存储库上的一个未解决问题有关(Issue #834,2022 年 12 月 11 日仍处于开放状态)。在解决之前,您可以尝试在分叉上进行修复,例如,这个。
根据文档,您应该下载如下:
coursera-dl -u my_coursera_username -p my_coursera_password neural-networks-deep-learning
请注意,如果您未通过网站正式注册,您将无法访问课程资料。
现在每个人都在使用原始 coursera-dl 存储库的分叉版本,该版本有效:https://github.com/raffaem/cs-dlp。 本质上,Coursera 弃用了 API 端点 onDemandCourseMaterials.v1 - 请参阅 github 问题 #384,并且没有更新 coursera-dl 的代码...但是如果您阅读了那里和 github 问题 #385 中的评论,你会看到现在每个人都在使用这个分叉的存储库,并且它对他们有用。 请注意,该命令将是
cs-dlp
而不是 coursera-dl
。 另外,您必须在 pip install .
后运行 git clone https://github.com/raffaem/cs-dlp
(带句点)并 cd 进入 cs-dsp 目录才能使用 cs-dlp
命令🤝