Open kaiserphong opened 1 year ago
@neuronalism I saw your update but it still can not download subtiles
File "C:\Users\Kaiser\Desktop\edxdlr-master\edxdlr.py", line 859, in
Yeah this is a known issue I currently have no solution for. I'll leave it here till I got some time to debug and fix this.
First, I want to say thank you so much to you for this tool, it help me a lot to download video and pdf file. but it can not download subtitle of some my courses; For example: course ID: course-v1:MITx+3.032.1x+3T2019
File "C:\Users\Kaiser\Desktop\edxdlr-master\edxdlr.py", line 841, in
main()
File "C:\Users\Kaiser\Desktop\edxdlr-master\edxdlr.py", line 834, in main
download_course(args, course_block, runtime.headers, file_formats)
File "C:\Users\Kaiser\Desktop\edxdlr-master\edxdlr.py", line 718, in download_course
download_unit(unitobj, args, target_dir, filename_prefix, headers)
File "C:\Users\Kaiser\Desktop\edxdlr-master\edxdlr.py", line 687, in download_unit
download_video(unit, args, target_dir, filename_prefix, headers)
File "C:\Users\Kaiser\Desktop\edxdlr-master\edxdlr.py", line 650, in download_video
sub_downloads = _build_subtitles_downloads(video_unit, target_dir, filename_prefix, headers)
File "C:\Users\Kaiser\Desktop\edxdlr-master\edxdlr.py", line 515, in _build_subtitles_downloads
subtitles_download_urls = get_subtitles_urls(video.subs_available_url,
File "C:\Users\Kaiser\Desktop\edxdlr-master\edxdlr.py", line 455, in get_subtitles_urls
available_subs = get_page_contents_as_json(available_subs_url,
File "C:\Users\Kaiser\Desktop\edxdlr-master\utils.py", line 91, in get_page_contents_as_json
json_string = get_page_contents(url, headers, params)
File "C:\Users\Kaiser\Desktop\edxdlr-master\utils.py", line 72, in get_page_contents
response = runtime.session.get(url, params=params, headers=headers)
File "C:\Users\Kaiser\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\sessions.py", line 543, in get
return self.request('GET', url, kwargs)
File "C:\Users\Kaiser\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\sessions.py", line 530, in request
resp = self.send(prep, send_kwargs)
File "C:\Users\Kaiser\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\sessions.py", line 637, in send
adapter = self.get_adapter(url=request.url)
File "C:\Users\Kaiser\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\sessions.py", line 730, in get_adapter
raise InvalidSchema("No connection adapters were found for {!r}".format(url))
requests.exceptions.InvalidSchema: No connection adapters were found for '/courses/course-v1:MITx+3.032.1x+3T2019/xblock/block-v1:MITx+3.032.1x+3T2019+type@video+block@e69dd0e13c6f4d568506b402a8e7b54d/handler/transcript/available_translations'
I need to download subtitle of this video by manual and this is link: https://courses.edx.org/courses/course-v1:MITx+3.032.1x+3T2019/xblock/block-v1:MITx+3.032.1x+3T2019+type@video+block@e69dd0e13c6f4d568506b402a8e7b54d/handler/transcript/download
I am looking forward to your support!