add getId/getUrl to wikipedia

This commit is contained in:
j 2009-07-14 13:21:20 +02:00
parent bf29d8fc5d
commit 4b567eef55

View file

@ -109,3 +109,9 @@ def find(query, max_results=10):
results.append((title, url, ''))
return results
def getId(url):
return url.split("/")[-1]
def getUrl(id):
return "http://en.wikipedia.org/wiki/%s" % id