Lesson 01 - Introduction
Closed HarHarLinks closed 3 years ago
could you post the contents of the "Lesson 01 - Introduction" page?
I should mention:
ls 21ss/(VU) Spezielle Themen der Virtuellen Realität (VR II)/LessonExercise Recordings
Lesson01.mp4 Lesson_02___Applications_Trim.mp4 zoom_0_cut.mp4 zoom_0.mp4
I wouldn't be completely surprised if all other files are named zoom_0[_cut]?.mp4
and thus assumed already downloaded... if so it would be nice if you can circumvent that.
zoom_0_cut.mp4 is Exercise 1, zoom_0.mp4 is Lesson 03.
Yes we need to adress https://github.com/Romern/syncMyMoodle/issues/35
Works great! The Files being named after what appears to be their name on moodle is an added bonus.
Thank you very much, this week's outage has shown again that it is crucial to have this software and offline capabilities.
Of course I spoke to soon.
It does work great on the course I reported above. However this change broke something else:
Syncing (VO) Funktionale Programmierung...
Traceback (most recent call last):
File "syncMyMoodle.py", line 600, in scanForLinks
self.scanForLinks(response.text, parent_node, course_id, module_title=module_title, single=False)
File "syncMyMoodle.py", line 621, in scanForLinks
parent_node.add_child(f"{module_title}.mp4" or vid, vid, "Opencast", url=vid, additional_info=course_id)
File "syncMyMoodle.py", line 48, in add_child
name = base + base64.urlsafe_b64encode(str(id).encode("utf-8")) + ext
TypeError: can only concatenate str (not "bytes") to str
Error while downloading url https://moodle.rwth-aachen.de/pluginfile.php/1541497/mod_page/content/index.html?forcedownload=1: can only concatenate str (not "bytes") to str
that should be fixed in https://github.com/Romern/syncMyMoodle/commit/9e1b03f11a8dfb27d7734403634b6bf6ed2a1515
Seems fixed.
Might I suggest, to use the upload date if possible as an identifier before or additional to resorting to base64 URL as ID? Perhaps combining the earlier and new naming method? I know this is very nonstandard. I can provide dumps from all of my courses as examples if you want them.
I now have half a dozen
Videos from the Exercise CourseaHR0cHM6Ly9lbmdhZ2Uuc3RyZWFtaW5nLnJ3dGgtYWFjaGVuLmRlL3BsYXkvMTBiZGVhZjItNzJhMy00YTdhLTk5N2EtYTVjZmE0NzBjOTUw.mp4
or
NoneaHR0cHM6Ly9lbmdhZ2Uuc3RyZWFtaW5nLnJ3dGgtYWFjaGVuLmRlL3BsYXkvYTc1ZmViM2QtNjBkZi00NzE0LWFiYTctN2RlMDJmMWYxNDA1.mp4
which is better than not having them, but it would be nice to be able to identify which is which easily.
Seems reasonable, especially in cases like you mentioned. Ideally you could make a merge request with the changes.
I think f"{module_title}.mp4" or vid
never hits vid
, because the string is never False unless there is something I don't know about None in f-strings. That would be the reason I get the None{base64}.mp4
videos where they were formerly named properly.
I have a PR cooking that should achieve what I suggested once it's finished.
good catch, I fixed that in https://github.com/Romern/syncMyMoodle/commit/c0a0b5f3021f025d740a6e2771cb1a1b6413efbf
Lesson/Exercise Recordings of https://moodle.rwth-aachen.de/course/view.php?id=14908 (Spezielle Themen der Virtuellen Realität (VR II) (VU) [21ss-12.53694])
``` ./syncMyMoodle.py --courses https://moodle.rwth-aachen.de/course/view.php\?id\=14908 --verbose ```
``` { "id": 142745, "name": "Lesson/Exercise Recordings", "visible": 1, "summary": "Each page features a player, which loads quite slowly. Just wait a few seconds for it to appear.