By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,271 Members | 1,722 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,271 IT Pros & Developers. It's quick & easy.

python wiki question

P: n/a
Hi,

Does anybody know how to determine if a wiki page is a redirectpage
using the wikipedia-scripts? It must be something like

if IsRedirectPage() == False:
text_file.write("\n")

But I cannot seem to get it working.

thnx
Ruud
Nov 10 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ruud habets schreef:
Hi,

Does anybody know how to determine if a wiki page is a redirectpage
using the wikipedia-scripts? It must be something like

if IsRedirectPage() == False:
text_file.write("\n")

But I cannot seem to get it working.

thnx
Ruud
problem solved:

def workon(page):
try:
text = page.get()
except wikipedia.IsRedirectPage:
return

text_file.write(page.title().encode("utf-8"))
text_file.write("\n")
text_file.write(page.get().encode("utf-8"))
text_file.write("\n")
print page

thnx anyway
ruud
Nov 10 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.