Problem checking an existing browser cookie

Νίκος nikos.the.gr33k at
Mon Aug 16 12:57:58 CEST 2010

# initialize cookie
cookie = Cookie.SimpleCookie()
cookie.load( os.environ.get('HTTP_COOKIE', '') )
mycookie = cookie.get('visitor')

if ( mycookie and mycookie.value != 'nikos' ) or r'(cyta|
yandex|13448|spider|crawl)', host ) is None:

I checked and Chrome has a cookie names visitor with a value of nikos
So, i have to ask why the if fails?

Thank you.

More information about the Python-list mailing list