By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,033 Members | 1,952 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,033 IT Pros & Developers. It's quick & easy.

Why doesn't urllib show the right source

P: 1
>>> import urllib
>>> data=urllib.urlopen('').read()
>>> print data

When I do this in python it results in a 404 error saying the file is not found. The source is completely different from the actual page source.

So my question is how do I make python result in the correct page source?

Also, how would I write in a script to enter information in a website, such as entering a ticker symbol into the above mentioned website and extracting the results?
Jun 19 '11 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.