--- Retriever.py.orig 2007-03-25 16:59:02.000000000 +0200 +++ Retriever.py 2007-03-25 16:58:58.000000000 +0200 @@ -81,6 +81,9 @@ referrer = config and config.get_string('referrer', None) if referrer: self.addheader('Referer', referrer) + cookie = config and config.get_string('cookie', None) + if cookie: + self.addheader('Cookie', cookie) self.addheader ('Accept', 'image/jpeg, image/gif, image/png, text/html, text/plain, text/xhtml;q=0.8, text/xml;q=0.6, text/*;q=0.4') if os.environ.has_key ('HTTP_PROXY') and (os.environ.has_key ('HTTP_PROXY_USER') and os.environ.has_key ('HTTP_PROXY_PASS')): --- Spider.py.orig 2007-03-25 16:59:03.000000000 +0200 +++ Spider.py 2007-03-25 16:59:00.000000000 +0200 @@ -1291,6 +1291,8 @@ message(0, " Use as the status file.") message(0, " --referrer=:") message(0, " Send the specified when fetching remote pages.") + message(0, " --cookie=:") + message(0, " Send the specified when fetching remote pages.") message(0, " --user-agent=:") message(0, " Send the specified as the identification of") message(0, " of the 'browser' when fetching remote pages. Defaults to") @@ -1360,6 +1362,7 @@ owner_id = None url_pattern = None referrer = None + cookie = None user_agent = None title = None author = None @@ -1390,7 +1393,7 @@ "not-launchable", "backup", "no-backup", "beamable", "not-beamable", "icon=", "charset=", "owner-id=", - "url-pattern=", "referrer=", + "url-pattern=", "referrer=", "cookie=", "user-agent=", "title=", "author=", "status-file=", "version", "tables", "depth-first", "http-proxy=", @@ -1517,6 +1520,8 @@ owner_id = arg elif opt == "--referrer": referrer = arg + elif opt == "--cookie": + cookie = arg elif opt == "--user-agent": user_agent = arg elif opt == "--title": @@ -1720,6 +1725,8 @@ config.set ('owner_id_build', owner_id) if referrer is not None: config.set ('referrer', referrer) + if cookie is not None: + config.set ('cookie', cookie) if user_agent is not None: config.set ('user_agent', user_agent) if author is not None: