471,310 Members | 1,137 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,310 software developers and data experts.

404 whenever i try to access wikipedia via python

all help is appreciated:

>>> x = urllib.urlopen("http://en.wikipedia.org/wiki/Python")
>>> x.read()

(returns error page)
Jul 20 '07 #1
5 1851
bartonc
6,596 Expert 4TB
all help is appreciated:

>>> x = urllib.urlopen("http://en.wikipedia.org/wiki/Python")
>>> x.read()

(returns error page)
Interested in snakes, are ya? JK..

It works for me; copied verbatim from your post. Of course I added the
Expand|Select|Wrap|Line Numbers
  1. import urllib
Jul 20 '07 #2
Interested in snakes, are ya? JK..

It works for me; copied verbatim from your post. Of course I added the
Expand|Select|Wrap|Line Numbers
  1. import urllib
are you sure it does? check out the html it feeds. it wont be the actual article, it'll be an error page in different languages.
Jul 20 '07 #3
bartonc
6,596 Expert 4TB
are you sure it does? check out the html it feeds. it wont be the actual article, it'll be an error page in different languages.
Dare I post an excerpt?<deleted>
I'll probably need to delete this soon.
Jul 20 '07 #4
lol, you didn't post any of the content. just the html. check out between the <p>'s</p>
Jul 20 '07 #5
ilikepython
844 Expert 512MB
I got the error. I ran this and opened "test.txt" in internet explorer and got a page about wikipedia having technical difficulties:
Expand|Select|Wrap|Line Numbers
  1. import urllib
  2. page = urllib.urlopen("http://en.wikipedia.org/wiki/Python")
  3. data = page.readlines()
  4.  
  5. f = file(r"C:\Documents and Settings\Owner\Desktop\test.txt", "w")
  6.  
  7. for line in data:
  8.     f.write(line)
  9. f.close()
  10.  
I think its their problem not yours.
Jul 20 '07 #6

Post your reply

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

Similar topics

8 posts views Thread by bearophileHUGS | last post: by
24 posts views Thread by Luis M. González | last post: by
5 posts views Thread by Rostfrei | last post: by
27 posts views Thread by John J. Lee | last post: by
13 posts views Thread by Paddy | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.