473,246 Members | 1,495 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,246 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 1947
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:...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.