Timwi wrote:
Gutza wrote:
Speaking of which (don't want to start a new
thread for this), is
there any way to retrieve only the status of a page? Meaning, "0" if
it doesn't exist, "1" if it does or an URL if it's a redirect -- I
guess that would be the logical way to do it. I think it would be
nice to have for automated quick searches.
Well, if you try this with a non-existent page:
http://en.wikipedia.org/w/wiki.phtml?title=Nonexistantpage&action=raw&a…
you get "<html><body></body></html>". Not the most
professional of
ways of saying "this page doesn't exist", but since it's unlikely to
be the body of a real article, I suppose you can use this.
Redirects are ridiculously easy to parse with a regular expression.
Yes, but you see, if you want for instance to highlight words in a text
which can be linked to articles in Wikipedia, then you would need to
retrieve all pages for no real reason. Don't get me wrong, I'm not
really saying that I *need* this functionality right now, nor am I
pushing towards it in any way, I'm just saying that once it's in place,
it might help others to write applications around Wikipedia, thus adding
value to the project, at least due to the extra exposure, if nothing else.
--Gutza