-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Supply a template or txt file with course names for easy lookup #59
Comments
Hi, Ivo. On Mon, Feb 11, 2013 at 1:22 PM, Ivo Flipse notifications@github.com wrote:
Well, supposedly, the idea would be to download material from courses
I guess that one of the easiest routes would be to grab this Furthermore, keeping such lists may need some manual intervention and The reason for that may be because the course won't be offered on And, of course, to have access to the courses, you have to click the Please, clarify how you intend to keep the list of courses up-to-date Thanks, Rogério Brito : rbrito@{ime.usp.br,gmail.com} : GPG key 4096R/BCFCAAAA |
I personally only download courses when all the material is available, because else I would have to come back later and download the rest anyway. But I can understand if others use it to download video's to watch them offline or on-the-go. The issue with course material no longer being available could (hopefully) be caught with an exception when you get an access denied error. I guess the only work around I could imagine would be to parse the Course page for logged in users. But I can understand if all this level of automation is out of scope of the script. |
I've personally been facing a similar issue with the explosion of classes. I have used the following regex:
where courses.html is the page displayed when you click on "courses" underneath your name in the menu, and "grepo" is a script I wrote which does something like "grep -o" except it outputs only the text matched by the group. |
Inspired by your comment I messed around a little to see if I could get out this information. I couldn't get to my /courses page, so I just manually downloaded it. Automating this would be nice, but it works. Then I load the page using BeautifulSoup:
This gives us a list that contains each of the boxes on the /course page. From here we can try and extract the relevant information:
I added some prints, which aren't really needed, but just show you that you can retrieve the information you'd want. You could either use the url that's passed when you press the green button or use the course name, like your script currently uses. It seems that courses that are no longer accessible have a different url (with the auth part), so that's useful info too. So depending on the status of the course, you'd get something like this:
It would require some fiddling, because you no longer have to pass the names through the command line, so you'd have to insert them somewhere. Or make the script get the names from the parsed file and go through them one by one. Anyway, this was a fun experiment :-) If only I could get it to retrieve this information from the live page and possibly list the courses available for me, so I could pass the number of the course I wanted the script to download, that would be awesome! |
When I tried to use the otherwise awesome script I had to go and lookup all the names I wanted from the course list. So I just made a little txt file with the url handle and the name of the course, which I could then easily copy into the command line.
Perhaps it would be an idea to maintain a list of all the courses?
Past courses
Current courses (possibly incomplete)
The text was updated successfully, but these errors were encountered: