jplehmann/coursera — pull request #146 by jonasdt (2013-06-29 03:45:30+00:00)
Title: WIP: Add cookies, utils, define  module + cookie caching

Hey,

The `cookies` module contains all the cookie handling (grabbing tokens, etc).
I've also added a `utils` module (utility functions) and a `define` module (global constants), + some tests.
This removes two tasks from #118 :)

In addition, I implemented cookie caching (saved in Mozilla cookies.text format), as discussed in #119.
The cookies are always reused and stale sessions (e.g. session time-out) are detected and renewed.
Cookie files provided with the `-c` option are not cached: they should be used for debugging purposes or if
the coursera authentication has changed.
Maybe we can add a `no-cookie-cache` option to disable the caching and force authentication. What do you think?

It is still the same procedural code: as long as we don't change the requirements (e.g. other portals) that's OK for me ;)