Issue resolved. My code was working, the problem was PhantomJS 2.0, used 1.9.8 and now I have the 'cookies.txt' file as expected! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-list/attachments/20150327/4a29981f/attachment.html>