c0d3d3v / moodle-dl Goto Github PK
View Code? Open in Web Editor NEWMoodle-DL downloads course content fast from Moodle (eg. lecture pdfs)
License: GNU General Public License v3.0
Moodle-DL downloads course content fast from Moodle (eg. lecture pdfs)
License: GNU General Public License v3.0
Hello!
I'm enrolled in a course where the excercises are not uploaded directly into a structure (https://the_domain/moodle/course/view.php?id=3588) but in a sub-structure (https://the_domain/moodle/mod/data/view.php?id=169908) as it can be seen in the following image:
Said that, when configuration is done and executed, it doesn't download the sub-structure where files are located.
Is it possible to add that feature? It will be much appreciated!
I have followed the instructions to run this on Python 3.8, and it just doesn't work.
Traceback (most recent call last):
File "main.py", line 8, in <module>
import readline
ModuleNotFoundError: No module named 'readline'
I have an Error when I want to change the path.
The Moodle Downloader (all files, also config) is in D:\Uni\Moodle\Moodle-Downloader-2-master
.
I want to set the path to Moodle typing python D:\Uni\Moodle\Moodle-Downloader-2-master\main.py --path D:\Uni\Moodle\
. (Powershell)
Then he obviously has problems to find the config. Where is my fault?
Is there way to automatically download all the internal moodle links from course main page.
for eg following type of links are present in ".md" file, but these pdf files are not downloaded.
https://moodle.foouniv.com/webservice/pluginfile.php/2665772/course/section/243653/foo2.pdf
https://moodle.foouniv.com/pluginfile.php/1540393/mod_label/intro/foo1.pdf
If you remove files, which you don't need (anymore) or by accident, the database could reflect this state.
If you want to download those files again, you can do so easily (without manually modifying the database).
You could argue that if you don't want to the keep those files at all, hence you don't want to download them, they will be downloaded anyways if the database tracks removed files. But then again I don't think this is a sensible use case.
Hey,
I have issues obtaining the SSO Token as when i try to initialize with --init --sso i get through up to the part where i have to copy the page that didnt load. I dont get any not loading pages in my developer network window. I just get two 404s with one being the weppage itself and one being a background image. Every other request is ok(200). All I get from the network tool is a sess key. But i dont know what type of input the script expects? Can someone help me obtaining the SSO Token manually and get it to initialize?
Moodle Version is 3.83
It would also immensely help if someone knows the url its expecting there.
Thank you.
Is there any way to download accidentally deleted course folder without downloading everything else (or new configuration).
$ python3 main.py
doesn't support it.
Hey there, I am trying to login to moodle but even when I try manual or automatic sso token it never works. Can you please help?
Hello! I am an Arch Linux user that really enjoyed using this package. We have the AUR (Arch Linux User Repository), with lots of lesser known packages and unofficial to the distro. It's relatively easy to upload one in there, so I wrote a PKBUILD and uploaded it as moodle-dl-git.
I decided to install it directly from this source (hence the -git
suffix) instead of the releases page because there seem to be lots of releases and I don't have enough time to fully maintain it. I assumed that the master branch is more or less stable, though.
I just wanted to let the maintainers know about this. If you want to modify anything in the package I uploaded, do let me know. I can also add you as co-maintainers if you use this distro as well and are interested in helping out.
I partly opened this issue so that this can be added to the README for future Arch users, which prefer using the AUR than pip to install packages. Not sure if other distros have this program uploaded to their repositories, but it could be a new section in the "Installation" part.
Discussion forums does not seem to be downloaded. Good to have grades downloaded too.
Archive discussion forums as well, possibly either using MarkDown or HTML.
@C0D3D3V Glad that you are planning to add video downloads in the next few weeks.
Usually most of the mooc courses running moodle tend to store and link documents and videos to third party providers like youtube, tube.switch, vzaar among others.
I feel like it would be nice to crawl and scrap those videos from this script itself with indexing so that the videos and documents from third parties are not scattered and unindexed in case of downloading from third party tools like youtube-dl and video-downloader.
Just my two cents.
Cheers,
/z
After the crash, running again the program makes it break.
How to reproduce: configure a new account on a fresh install, then, when the terminal asks you "Do you want to make additional configurations now?" press the arrow down to go to no.
Reproduction rate: 100% every time i configure a new account on a fresh install.
Hi,
I downloaded and installed the master branch with python 3.5.9 locally installed using asdf.
$ pip3 install -r requirements.txt --user
Collecting sentry_sdk>=0.13.5 (from -r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/8e/e6/058c2dc4723b3647a8cf61385c61f284bfbd0d0657bc5623c22e9ef45a3c/sentry_sdk-0.14.2-py2.py3-none-any.whl (96kB)
100% |████████████████████████████████| 102kB 775kB/s
Collecting cutie>=0.2.2 (from -r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/79/1d/f8389619189b3de32f66be40cc7d17d6d2c06e35bbd21f6869120bd912b3/cutie-0.2.2-py3-none-any.whl
Collecting colorama>=0.4.3 (from -r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/c9/dc/45cdef1b4d119eb96316b3117e6d5708a08029992b2fee2c143c7a0a5cc5/colorama-0.4.3-py2.py3-none-any.whl
Collecting urllib3>=1.10.0 (from sentry_sdk>=0.13.5->-r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/e8/74/6e4f91745020f967d09332bb2b8b9b10090957334692eb88ea4afe91b77f/urllib3-1.25.8-py2.py3-none-any.whl (125kB)
100% |████████████████████████████████| 133kB 1.6MB/s
Collecting certifi (from sentry_sdk>=0.13.5->-r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/b9/63/df50cac98ea0d5b006c55a399c3bf1db9da7b5a24de7890bc9cfd5dd9e99/certifi-2019.11.28-py2.py3-none-any.whl (156kB)
100% |████████████████████████████████| 163kB 1.8MB/s
Collecting readchar (from cutie>=0.2.2->-r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/ef/f3/50cc9199733bf91f3c140150752a6430d8b785f9d22a31dcae721edb0b9a/readchar-2.0.1-py3-none-any.whl
Installing collected packages: urllib3, certifi, sentry-sdk, readchar, colorama, cutie
Successfully installed certifi-2019.11.28 colorama-0.4.3 cutie-0.2.2 readchar-2.0.1 sentry-sdk-0.14.2 urllib3-1.25.8
So far so good, but:
$ python3 main.py --init
File "main.py", line 238
f"'{path}' is not a valid path. Make sure the directory exists.")
^
SyntaxError: invalid syntax
Which directory is it asking for? And which {path} is it referring to?
Cheers!
/z
I have a couple of systems running the script and the only inconvenience i faced is that if i want to go back to the work that I hve made I have to manually download the files that i want.
Also it would be nice for example, to get to the end of a course, run the script and have an offline copy of all the work you have done, as well as all the files in case the page ever gets removed.
Running main.py throws this:
Error:module 'urllib.parse' has no attribute '_splittype'
xxx.pdf Traceback (most recent call last):
File "/mnt/c/xxx/md2/download_service/url_target.py", line 185, in download
reporthook=self.add_progress)
File "/mnt/c/xxx/md2/download_service/url_target.py", line 215, in urlretrieve
url_type, path = urlparse._splittype(url)
AttributeError: module 'urllib.parse' has no attribute '_splittype'
Error:module 'urllib.parse' has no attribute '_splittype'
The log basically reads the same.
running Ubuntu 18.04.4 LTS on Windows Subsystem for Linux
Python3 3.6.9
Python 2.7.17
Any Ideas?
When only one file in a folder is changed, the entire folder is recognized as changed.
Some use more than one Moodle platform and would like to download them all with one command.
This would replace the --path
option, because then the path is in the configuration file.
This would standardize the downloader a bit more.
Most of the time content is not on the main page but on secondary pages: the only file saved will be a ".desktop" page, and not the content inside that page. More on screenshot.
(Gets the PDF but not the videos because they aren't directly in the main page)
(Clicking on the "video" will redirect on the page i really wanted to go for the download)
python3 main.py --init
Do you want to activate Notifications via mail [y/n]? n
Do you want to configure Error Reporting via Sentry? [y/n]n
[The following Credentials are not saved, it is only used temporarily to generate a login token.]
URL of Moodle: https://moodle.bulme.at
Username for Moodle: <username>
Password for Moodle [no output]:
Error while communicating with the Moodle System! (An Unexpected Error happened on side of the Moodle System!) Please try again.
version (https://moodle.bulme.at/lib/upgrade.txt):
This files describes API changes in core libraries and APIs,
information provided here is intended especially for developers.
=== 3.7 ===
* Nodes in the navigation api can have labels for each group. See set/get_collectionlabel().
* The method core_user::is_real_user() now returns false for userid = 0 parameter
——— ~ *snip* ~ ———
EDIT: take a look at the title of the repo
After fixing the UTF-8 encoding issue, I tried re-starting the download process.
After some time downloading part of the files, it halts after throwing this error:
Moodle Downloader starting...
Loading config...
Checking for changes for the configured Moodle-Account...
Download course information 1/ 1 [Linguaggi e Par..| 1771]
Start downloading changed files...
Total: 31% 17375/ 54549kb T0: 97% T1: 0% T2: 0% T3: 0% T4:Exception in thread Thread-4:
Traceback (most recent call last):
File "C:\Users\myuser\PycharmProjects\Moodle-Downloader-2\download_service\url_target.py", line 205, in download
self.create_description()
File "C:\Users\myuser\PycharmProjects\Moodle-Downloader-2\download_service\url_target.py", line 167, in create_description
self.file.saved_to = self._rename_if_exists(self.file.saved_to)
File "C:\Users\myuser\PycharmProjects\Moodle-Downloader-2\download_service\url_target.py", line 121, in _rename_if_exists
Path(new_path).touch()
File "C:\Users\myuser\AppData\Local\Programs\Python\Python37-32\lib\pathlib.py", line 1220, in touch
fd = self._raw_open(flags, mode)
File "C:\Users\myuser\AppData\Local\Programs\Python\Python37-32\lib\pathlib.py", line 1028, in _raw_open
return self._accessor.open(self, flags, mode)
OSError: [Errno 22] Invalid argument: "Linguaggi e Paradigmi di Programmazione 2019\\7 ottobre - 13 ottobre\\Teoria\r\nFare riferimento all'articolo di Hudak (19.md"
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\myuser\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\Users\myuser\PycharmProjects\Moodle-Downloader-2\download_service\downloader.py", line 41, in run
response = url_target.download(self.thread_id)
File "C:\Users\myuser\PycharmProjects\Moodle-Downloader-2\download_service\url_target.py", line 231, in download
os.path.getsize(self.file.saved_to) == 0):
File "C:\Users\myuser\AppData\Local\Programs\Python\Python37-32\lib\genericpath.py", line 50, in getsize
return os.stat(filename).st_size
OSError: [WinError 123] La sintassi del nome del file, della directory o del volume non è corretta: "Linguaggi e Paradigmi di Programmazione 2019\\7 ottobre - 13 ottobre\\Teoria\r\nFare riferimento all'articolo di Hudak (19.md"
Total: 32% 17670/ 54549kb T0: 0% T1: 0% T2: 0% T3: 0% T4:
Process finished with exit code -1 <---- Here I manually stopped the program
This is the HTML of the description section that causes the problem.
I believe it is caused by newlines in the path ("Teoria\r\nFare riferimento all'articolo di Hudak (19.md")
Looking at the logs I'm getting error in a lot of files:
2020-01-15 10:15:13 ERROR {download_service} Error while trying to download file: [COURSE] -[File.pdf]! Exception: 's'
Not sure why.
Also a option for saving the files in a specific location and not in the same folder as all the files would be awesome so I can have my files organized.
Hi everyone, when I set up the moodle account i receive this errors:
Error while communicating with the Moodle System! (An Unexpected Error happened on side of the Moodle System! Status-Code: 404 Header: [('Date', 'Wed, 19 Feb 2020 10:01:18 GMT'), ('Server', 'Apache/2.4.7 (Ubuntu)'), ('Content-Length', '304'), ('Content-Type', 'text/html; charset=iso-8859-1')] Response: b'<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found</h1>\n<p>The requested URL /moodle\\login/token.php was not found on this server.</p>\n<hr>\n<address>Apache/2.4.7 (Ubuntu) Server at elearning.unisi.it Port 443</address>\n</body></html>\n') Please try again.
but as you can see the token.php page is on the server: https://elearning.unisi.it/moodle/login/token.php and in https://elearning.unisi.it/moodle//login/token.php
What can i do? can i manually extract the token and pass it to the software?
Thanks in advance!
It is continuation of issue #43. It more makes sense to use the git
approach for folder version management in downloaded course folder.
It will automatically add features to solve the issue of accidental file/folder deletion.
May be it is better that if each course can be treated independently, for e.g.,
$ python3 main.py --pull "$(courseid)" # will update the course content for id $(courseid)
$ python3 main.py --status "$(courseid)" # show status as git status
$ python3 main.py --checkout $(courseid) $(logid) # restore to old log id like git checkout
$ python3 main.py --rm $(some_individual_file) # like git rm
Im using Manjaro, and im getting a couple of errors:
$ pip3 install -r requirements.txt
Collecting sentry_sdk>=0.13.5 (from -r requirements.txt (line 1)) Downloading https://files.pythonhosted.org/packages/ba/0b/ba1655f0e9c248538b02322a979b5cd485156f5cc16ea34a3cff563527ee/sentry_sdk-0.14.0-py2.py3-none-any.whl (93kB) |████████████████████████████████| 102kB 2.7MB/s Requirement already satisfied: urllib3>=1.10.0 in /usr/lib/python3.8/site-packages (from sentry_sdk>=0.13.5->-r requirements.txt (line 1)) (1.25.7) Collecting certifi (from sentry_sdk>=0.13.5->-r requirements.txt (line 1)) Downloading https://files.pythonhosted.org/packages/b9/63/df50cac98ea0d5b006c55a399c3bf1db9da7b5a24de7890bc9cfd5dd9e99/certifi-2019.11.28-py2.py3-none-any.whl (156kB) |████████████████████████████████| 163kB 3.5MB/s Installing collected packages: certifi, sentry-sdk ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/usr/lib/python3.8/site-packages/certifi-2019.11.28.dist-info' Consider using the
--user` option or check the permissions.
$ pip3 install --user requirements.txt
Collecting requirements.txt ERROR: Could not find a version that satisfies the requirement requirements.txt (from versions: none) ERROR: No matching distribution found for requirements.txt
FYI - I'm running on Issue-41 build due to SSO / cookie issues.
I'm not receiving any other errors aside from the following youtube-dl excerpts. It does not show me the actual URL of where it is trying to go, but I know the youtube links in my lessons are public. I'm wondering if it is a parsing issue or something else. I'm running the latest version of youtube-dl from pip, on linux.
Thanks
Total: 0% 794/ 133314kb T0: 0% T1: 0% T2: 0% T3: 0% T4: 0%
youtube-dl: ERROR: unable to download video data: <urlopen error [Errno -2] Name or service not known>
youtube-dl: ERROR: unable to download video data: <urlopen error [Errno -2] Name or service not known>
Total: 0% 794/ 133314kb T0: 0% T1: 0% T2: 0% T3: 0% T4: 0%
Hi,
Thanks for your time and effort to build this software; it is a well designed piece of software. :-)
However, i think i found an issue regarding OS-Support.
I first tried to use the tool on Windows, and loaded the entire moodle of my university. (Courses i currently attend or attended in the past) and found some files missing, but are present in the browser.
I could not explain myself exactly why, because there were no errors in the console and some characters like ">" transferred to ")" so I've seen characters not supported in NTFS are taken care of.
After that, I tried the tool on Ubuntu with the same settings, and now it is working. No files missing.
Windows: 2,32 GB (624 Files, 190 Folders)
Ubuntu: 2,70 GB (707 Files, 203 Folders)
(I zip'ed the ubuntu files and extracted them to my windows-machine)
Maybe you can think of an explanation.
Regards
Blaubeere
i was doing my usual
moodle-dl
when i found youtube-dl error
This is the file log:
2020-11-05 08:31:25 ERROR {url_target} T2 - youtube-dl Error: ERROR: unable to open for writing: [Errno 22] Invalid argument: '\\\\?\\H:\\moodle\\Modelli e architetture avanzati di basi di dati, aa 2019_2020\\Introduzione\\Calendario del corso (con suddivisione tra le docenti) # Google Calendar - Accedi per visualizzare e modificare i tuoi impegni (calendarcid=MDViYXBvYXQ3ZmJwcTc4NHNtM2s2dmoybGtAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ&btmpl=mobile<mpl=mobileh&scc=1).unknown_video.part'
2020-11-05 08:31:25 ERROR {url_target} T2 - Error while trying to download file: URLTarget (File (module_id: 121843, section_name: "Introduzione", module_name: "Calendario del corso (con suddivisione tra le docenti)", content_filepath: /, content_filename: "Calendario del corso (con suddivisione tra le docenti)", content_fileurl: "https://calendar.google.com/calendar?cid=MDViYXBvYXQ3ZmJwcTc4NHNtM2s2dmoybGtAZ3JvdXAuY2FsZW5kYXIuZ29vZ2xlLmNvbQ", content_filesize: 0, content_timemodified: 1551029281, module_modname: url, content_type: url, content_isexternalfile: False, saved_to: "\\?\H:\moodle\Modelli e architetture avanzati di basi di dati, aa 2019_2020\Introduzione\Calendario del corso (con suddivisione tra le docenti).URL", time_stamp: 1604561482, modified: False, moved: False, deleted: False, notified: False, hash: None, file_id: None, old_file_id: None), Course (id: 1947, fullname: "Modelli e architetture avanzati di basi di dati, aa 2019_2020", overwrite_name_with: "None", create_directory_structure: True, files: 1), False, Error: Traceback (most recent call last):
File "C:\Users\marco\AppData\Roaming\Python\Python37\site-packages\moodle_dl\download_service\url_target.py", line 719, in download
self.try_download_link(add_token, False, False)
File "C:\Users\marco\AppData\Roaming\Python\Python37\site-packages\moodle_dl\download_service\url_target.py", line 476, in try_download_link
'Youtube-dl could not download the URL. For details see youtube-dl error messages in the log file'
RuntimeError: Youtube-dl could not download the URL. For details see youtube-dl error messages in the log file
Error:Youtube-dl could not download the URL. For details see youtube-dl error messages in the log file)
Could you add a command to download all the courses the user can SEE and not just ones they are enrolled in since I can see other courses on my moodle, which I'm not enrolled in?
have a command to download a course by its id.
Wonderful tool you got there, thanks for it.
I can download videos hosted on you tube with the latest builds, but it simply skips .pdf (and zipped files, I guess...). Also, if I recall correctly, I did not have this problem in version 1.6.
Thanks for your time!
I upgrade at the new version 2.1.0.1 and an exception was thrown.
Image deleted!
I don't have a cookies file
For me the automated sso login does not work for one moodle. It does work for another moodle.
SSO url: https://moodle.informatik.tu-darmstadt.de/admin/tool/mobile/launch.php?service=moodle_mobile_app&passport=12345&urlscheme=http%3A%2F%2Flocalhost
error/Invalid parameter: the value of urlscheme isn't valid. It should start with a letter and can only contain letters, numbers and the characters "." "+" "-".
It works for another moodle where the url is https://moodle.tu-darmstadt.de/admin/tool/mobile/launch.php?service=moodle_mobile_app&passport=12345&urlscheme=http%3A%2F%2Flocalhost
Didn't find the version of the moodles so far and from a quick search it looks like they're trying to hide it.
after entering the url,username, password it throw this. not sure why
tried both
https://training.fortinet.com/login/index.php?saml=off
and
https://training.fortinet.com/login/index.php
Php files are not being downloaded, only the md files even though external files are selected.
2020-09-14 22:31:44 DEBUG {results_handler} Detected moodle version: 2019111803
2020-09-14 22:31:46 WARNING {cookie_handler} Moodle cookie has expired, an attempt is made to generate a new cookie.
2020-09-14 22:31:53 DEBUG {moodle_service} Checking for changes...
2020-09-14 22:31:53 DEBUG {main} Start downloading changed files...
2020-09-14 22:31:57 ERROR {download_service} Error while trying to download file: URLTarget (File (module_id: 7377770, section_name: Week 1, module_name: Assignment 3: Assessm..., content_filepath: /, content_filename: h
ttps://moodleaddress.com/mod/workshop/view.php?id=12345, content_fileurl:h
ttps://moodleaddress.com/mod/workshop/view.php?id=12345, content_filesize: 0, content_timemodified: 0, module_modname: cookie_mod, content_isexternalfile: True, saved_to: class1/Week 1 - assignments /https꞉//moodleaddress.com/mod/workshop/view.php?id=12345, time_stamp: 0, modified: False, moved: False, deleted: False, notified: False, hash: None), False, None)
Hey, I came across a UnicodeEncodeError while using Moodle_Downloader_2.
Start downloading changed files...
Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/app/moodle_downloader_2/download_service/downloader.py", line 61, in run
self.state_recorder.save_file(
File "/app/moodle_downloader_2/state_recorder/state_recorder.py", line 335, in save_file
self.new_file(file, course_id, course_fullname)
File "/app/moodle_downloader_2/state_recorder/state_recorder.py", line 346, in new_file
cursor.execute("""INSERT INTO files
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcc3' in position 11: surrogates not allowed
What happens when files where deleted on moodle?
Here an extract from the last run:
Public Key Infrastrukturen 2019
- /files/Public Key Infrastrukturen 2019/Allgemeines/Klausur_Deckblatt.pdf
- /files/Public Key Infrastrukturen 2019/Allgemeines/Task3Solved.pdf
[..]
Fortunately it looks like the files were not deleted (I think downloaded files should never be deleted). So, am I right that this only reflects a database change?
Would be great for automated systems to have the command moodle-dl --new-token username password
instead of being a triple step command, so my server can re-generate the token when it's not working anymore.
What is this error?
Moodle Downloader starting... Loading config... Checking for changes for the configured Moodle-Account... Download account informationException: Traceback (most recent call last): File "D:\Marco\Universita\Moodle-Downloader-2\moodle_connector\moodle_service. py", line 160, in fetch_state userid, version = results_handler.fetch_userid_and_version() File "D:\Marco\Universita\Moodle-Downloader-2\moodle_connector\results_handler .py", line 30, in fetch_userid_and_version result = self.request_helper.post_REST('core_webservice_get_site_info') File "D:\Marco\Universita\Moodle-Downloader-2\moodle_connector\request_helper. py", line 65, in post_REST return self._initial_parse(response) File "D:\Marco\Universita\Moodle-Downloader-2\moodle_connector\request_helper. py", line 207, in _initial_parse exception, errorcode, message moodle_connector.request_helper.RequestRejectedError: The Moodle System rejected the Request. Details: moodle_exception (Errorcode: invalidtoken, Message: Token non valido - il token non ▒ stato trovato) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "main.py", line 208, in run_main changed_courses = moodle.fetch_state() File "D:\Marco\Universita\Moodle-Downloader-2\moodle_connector\moodle_service. py", line 213, in fetch_state error)) RuntimeError: Error while communicating with the Moodle System! (The Moodle Syst em rejected the Request. Details: moodle_exception (Errorcode: invalidtoken, Mes sage: Token non valido - il token non ▒ stato trovato)) The following error occurred during execution: Error while communicating with th e Moodle System! (The Moodle System rejected the Request. Details: moodle_except ion (Errorcode: invalidtoken, Message: Token non valido - il token non ▒ stato t rovato))
The script does not download videos uploaded to kaltura with the kaltura moodle plugin: https://moodle.org/plugins/view.php?id=447
It just skips the video altogether.
The videos are viewable from link:
MOODLESITE/mod/kalvidres/view.php?id=NUMERICID
I've tried to get the script to work, but I cannot find any module called "electrum". All Requirements are installed. Do you have further informations?
user@server:~/Moodle-Downloader-2# python3 main.py --init
Traceback (most recent call last):
File "main.py", line 15, in
from config_service.config_service import ConfigService
File "/user/Moodle-Downloader-2/config_service/config_service.py", line 4, in
from moodle_connector.results_handler import ResultsHandler
File "/user/Moodle-Downloader-2/moodle_connector/results_handler.py", line 5, in
from electrum.plugins.coldcard import description
ModuleNotFoundError: No module named 'electrum'
I am using WIn10 and got the problem sretting up the config via main.py --init
I typed in URL (in my case moodle.rub.de), the username, the password. After a few seconds I get the Error of the topic. In addition it says the Destination Computer refuses the connection establishment.
Is there any solution or am I doing something wrong? I also checked my Firewall and tried to execute it with deactivated firewall...
Thanks for help!
Hi, could you check in an example configuration?
I'd like to use the tool but our university uses SSO. Maybe it is possible to obtain the token externally and pass it using the config. It would be helpful to have a template configuration, so one doesn't have to look up configurable options in the code.
It would be nice to introduce the possibility of downloading videos in mp4 format. Currently the system only produces a link which, once opened, downloads the video. Maybe you could choose it during configuration
I'd like the downloader to download BigBlueButton (an open-source webconferencing suite) lessons.
Usually lessons are grouped like the image below:
And redirect to a link like https://SITEWITHMOODLE/mod/bigbluebuttonbn/view.php?id=143127#
The main issue with BBB is that there is more than 1 recordings when it comes to lessons. Usually professors record themselves with a cam and a presentation PDF sliding. Being only the webcam a downloadable video, I find this very hard to implement this enhancement, but I'm proposing y'all.
As you can see (i removed the professor webcam on the right, but you can imagine), there is a playback control, but it's not related to a video, rather than a complicated presentation slider + webcam video as I previously said.
I don't know the exact cases when it happens but if a moodle section or course has special characters like "/" or ":" it always uses some kind of ID for the folder.
It names it "XXXXXX~X"
in alphanumerical chars with the same length.
Is it perhaps possible to parse out these special characters and just name the folder without them?
"Example course 1/2" to "Example course 1 2" instead of "XXXXXX~X"
Edit: just read the documentation again and yes you can rename the course name but as far as i see you can't rename the sections in the course. I think it would be easier for most people to just let it automatically rename the folder instead of doing it manually since the meaning should be clear even if the special character is missing.
Some professors post video links of zoom, universityspecificyoutube etc on moodle. Often these links require authorization, which can be handled by --cookies
option in youtube-dl
or --load-cookies
option in wget
.
Is there a way to automatically force download these links posted on moodle.
User can specify pattern of the links and software to use for them, something like,
dropbox -> wget
youtube -> youtube-dl
zoom -> wget
universityspecificyoutube -> youtube-dl
PS: the cookies can be set using https://github.com/dandv/convert-chrome-cookies-to-netscape-format
My university is using moodle with SSO however, they don't have the moodle downloader plugin enabled meaning I cannot perform the automatic or manual SSO sign in methods.
Would be fantastic if there was another method of getting the token.
I haven't analyzed how SSO works, so I can't help here.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.