is this possible (getting info off web page)

Esmail ebonak at
Thu Apr 9 23:47:17 CEST 2009


I am trying to keep track of two flight bookings on the
web site, and would like to automate my query using Python. If I
enter the url below myself into the browser,  a form gets filled
out and the site searches for flights. I would love to be able to
have a simple python script which I can supply with a url and
have it simply display, in text if possible, the best 3 prices.

I thought great opportunity to learn more about Python, and then
presumably re as I parse the text....

However, when I use the code below (located via google), I end up
with an alternate page, basically telling me that kayak doesn't like
bots. So, it seems like Kayak has it set up to prevent automated

Is there anyway to do what I would like to do?




import urllib2

url = ''
res = urllib2.urlopen(url)
page =

More information about the Python-list mailing list