Closed henryzt closed 3 years ago
Hi @henryz00 thank you for your PR.
Yeah I know there are usually multiple sources (hence the sorting) and the reason that only the first one is ever used is that previously in all cases I encountered, both streams are identical. Hence, downloading both streams are wasteful.
I think it's better if you add it as an optional flag as suggested in #28.
Hi @soraxas no problem! I have added the optional flag and defaults it to false.
I understand that you knew since you wrote it in the comments XD. I guess it's different based on different universities, since some do have a second feeds named hd2 etc.
I'm not quite familiar with the code (and python actually), so if I made a mistake or there exists a better way to do this please tell me, I'll try my best to fix it :)
Oh and if you can write a very small section in the FAQ about the new flag which enables downloading the alternative stream that would be great.
Sure thing, I have updated the argument and readme, and had a quick test without any problem :D
Awesome everything looks good @henryz00, thanks again for the PR!
Should fix #28.
The original methods for getting the video links only returns the first video among the array of videos for each lecture. However, most universities have two video feeds for their echo360 lecture casts (one for the screen and one for the camera).
For example, our university uses
echo360.org
platform, the URL array crawled by the program already contains all the feeds of the lecture, usually namedhd1
,hd2
orsd1
,sd2
, sorted alphabetically, the original methods will only choosehd1
to download.With this PR it will try to download the first two feeds, it might only work with
echo360.org
platform and download methods exceptfrom_json_mp4
. Currently, this behaviour is on by default, maybe we could add another argument in main to make this optional :)Minor bug fixes
--debug
flag doesn't work