Use cookies from a script in a browser

Rafael Durán Castañeda rafadurancastaneda at gmail.com
Mon Mar 21 04:33:56 EDT 2011


I think this<http://stackoverflow.com/questions/189555/how-to-use-python-to-login-to-a-webpage-and-retrieve-cookies-for-later-usage>could
help you

2011/3/18 gervaz <gervaz at gmail.com>

> On 18 Mar, 22:52, Miki Tebeka <miki.teb... at gmail.com> wrote:
> > You can use mechanize, which holds a cookie jar and can user the browser
> cookies as well.
>
> I use:
> opener =
> urllib.request.build_opener(urllib.request.HTTPCookieProcessor())
> urllib.request.install_opener(opener)
> I start scraping from http://page.com/home.html that need the cookies
> enabled, then, once I found what I was looking for, I've got
> http://page.com/pageX.html and http://page.com/pageY.html. Those page
> cannot be viewed if I just copy & paste the url in the browser,
> because they need the cookies.
>
> What can I do?
>
> Thanks,
> Mattia
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110321/d3067981/attachment-0001.html>


More information about the Python-list mailing list