add getId/getUrl to wikipedia
This commit is contained in:
parent
bf29d8fc5d
commit
4b567eef55
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue