469,336 Members | 6,132 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,336 developers. It's quick & easy.

Why doesn't urllib show the right source

>>> import urllib
>>> data=urllib.urlopen('http://www.sec.gov/edgar/searchedgar/companysearch.html/').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
0 1117

Post your reply

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

Similar topics

11 posts views Thread by Pater Maximus | last post: by
5 posts views Thread by Pete Wason | last post: by
5 posts views Thread by Randall Parker | last post: by
4 posts views Thread by nephish | last post: by
12 posts views Thread by mistral | last post: by
1 post views Thread by jonne | last post: by
11 posts views Thread by Ramon F Herrera | last post: by
9 posts views Thread by colin | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.