On Tue, Apr 19, 2011 at 4:44 AM, Mark Carter <alt.mcar...@gmail.com> wrote: > I'm in python 2.6.5, and have Firefox 3.6.13. I would like to download > some html from a site and scrape it programatically. The site requires > a cookie, which I have in Firefox. > > Is there a simple python recipe I can use to read the contents of a > url and say "just use the cookie that I have in Firefox"?
Untested (3rd Google hit for "import firefox cookies python"): http://blog.mithis.net/archives/python/90-firefox3-cookies-in-python At a minimum, I think you'll need to replace: from pysqlite2 import dbapi2 as sqlite With: import sqlite3 as sqlite You'll also have to figure out where Firefox's `cookies.sqlite` file is located on your system. Cheers, Chris -- My compiler is compiling, I swear! http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list