ronandalton / echo360-downloader

A bulk downloader script for Echo360 lecture recordings.
MIT License
9 stars 2 forks source link

Custom lecture start index #1

Closed MaxJohnstone7 closed 1 year ago

MaxJohnstone7 commented 1 year ago

Hi not really an issue but I think adding an optional cmd line arg for a custom lecture start index would be really useful.

For some reason echo likes to log itself out after some time at which point the following error occurs: 403 Client Error: Forbidden for url:

and then a new cookie file is required. This is fine as it's not hard to log back in and generate a new cookie.txt however there is not an option to resume the downloading at the lecture which the program crashed at.

Passing this start_index arg to the download_lessons function and changing the for loop to

for lesson_index in range(start_index,len(lesson_ids)): lesson_id = lesson_ids[lesson_index]

to provide this functionality would be quite helpful I think as I've had this problem occur a couple of times.

Great program btw tho, very handy.

Cheers,

Max

MaxJohnstone7 commented 1 year ago

Oh also, was just in the process of downloading my EMTH210 lectures.

Because EMTH210 has two streams I end up with double ups, maybe providing another argument which represents a step could be handy aswell although this is a problem for only a very select few courses.

ronandalton commented 1 year ago

Hey, thanks for trying out my script!

I agree that having a customisable lecture start time could be useful. I am also aware of the log out issue, and I think this has something to do with the program not updating the cookies file when it is sent new cookies by the server. I think ideally the script would detect which files have already been downloaded and skip them, but for this approach to work, I would also need to be able to identify files that were partially downloaded and re-download them.

I'll make a commit to introduce a custom start index for lectures in the meantime.

I'll also look into adding a step argument, but I'm not sure if that will fix the issue for all courses with multiple steams. Some courses also cut their lectures up into pieces and have multiple lecture streams, so I don't think that would work in that case. You can always just download everything if you have the bandwidth/time and delete the ones you don't need later.

ronandalton commented 1 year ago

I've added the --skip option which you can now use when downloading multiple lectures. I haven't added a --step option, but it shouldn't be difficult to do. Open another issue if this is something you think should be implemented. Thanks.