Mattschillinger / wikiteam

Automatically exported from code.google.com/p/wikiteam
0 stars 0 forks source link

Add authentication cookie support in dumpgenerator.py #60

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
To backup private wikis, it's useful if dumpgenerator.py is able to add proper 
authentication cookies to the requests it sends. (I just needed to do this 
myself.)

The attached patch uses the standard Python urllib2 cookie handling 
functionality to optionally read a standard Mozilla cookies.txt file and use 
these cookies for all requests it makes to the wiki.

I grant you license to freely apply this patch to your project under the GPL 
license. (Should be obvious, the patch is pretty much trivial, but just to make 
it totally clear.)

Happy backuping! ;-)

Cheers,
Fredrik Roubert

Original issue reported on code.google.com by fred...@roubert.name on 27 Jul 2013 at 3:39

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks! So you don't encounter the same problem as 
https://code.google.com/p/wikiteam/issues/detail?id=41 ?

Original comment by nemow...@gmail.com on 9 Sep 2013 at 12:46

GoogleCodeExporter commented 8 years ago
Issue 20 has been merged into this issue.

Original comment by nemow...@gmail.com on 9 Sep 2013 at 12:48

GoogleCodeExporter commented 8 years ago
No, the wiki I wanted to dump didn't offer Basic HTTP authentication at all, so 
I couldn't encounter any problems with that. Instead, I found it useful to log 
in manually and then use the cookie jar from the web browser.

Original comment by fred...@roubert.name on 9 Sep 2013 at 12:55

GoogleCodeExporter commented 8 years ago
Thanks again, I've tested the patch and applied it now with r840. Sorry for the 
delay.

Original comment by nemow...@gmail.com on 9 Oct 2013 at 8:13