473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 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 1948
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

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

Similar topics

3
by: Claudio Grondi | last post by:
Is there an already available script/tool able to extract records and generate proper HTML code out of the data stored in the Wikipedia SQL data base? e.g. converting all occurences of ] to <a...
8
by: bearophileHUGS | last post by:
The free wikipedia is adopting a standard pseudocode: http://en.wikipedia.org/wiki/Wikipedia_talk:Wikicode/Specification MShonle says something nice: I support the idea of wikicode. Basically I...
4
by: Claudio Grondi | last post by:
I need to unpack on a Windows 2000 machine some Wikipedia media .tar archives which are compressed with TAR 1.14 (support for long file names and maybe some other features) . It seems, that...
24
by: Luis M. González | last post by:
For those interested in the simplest, easiest and most pythonic web framework out there, there's a new page in Wikipedia: http://en.wikipedia.org/wiki/Karrigell
11
by: Paddy | last post by:
I just had a link to Tim peters first post on doctest: http://groups.google.com/group/comp.lang.python/msg/1c57cfb7b3772763 removed from http://en.wikipedia.org/wiki/Doctest as it doesn't fit...
5
by: Rostfrei | last post by:
Hello! I'm writing this message over Google web access. I'm trying to access to the comp.lang.python newsgroup trough the Thunderbird, but I just can't configure it properly. What is the news...
27
by: John J. Lee | last post by:
I'm surprised to read this: http://en.wikipedia.org/wiki/Python_3 """Note that while there is no explicit requirement that code be able to run unmodified in both versions, in practice it is...
2
by: John Nagle | last post by:
For some reason, Python's parser for "robots.txt" files doesn't like Wikipedia's "robots.txt" file: False The Wikipedia robots.txt file passes robots.txt validation, and it doesn't disallow...
13
by: Paddy | last post by:
I would value the opinion of fellow Pythoneers who have also contributed to Wikipedia, on the issue of "Is Python Standardized". Specifically in the context of this table:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.