1
0
mirror of http://aero2k.de/t/repos/urlbot-native.git synced 2017-09-06 15:25:38 +02:00

wp: now with redirects

This commit is contained in:
2015-02-06 14:27:35 +01:00
committed by urlbot
parent 15225377d7
commit f4cb792c83

View File

@@ -533,8 +533,8 @@ def command_wp(argv,lang="de",**args):
'msg': args['reply_user'] + ": You must enter a query" 'msg': args['reply_user'] + ": You must enter a query"
} }
api = { "action" : "query", "prop" : "extracts", "explaintext": "" , "redirect": "", api = { "action" : "query", "prop" : "extracts", "explaintext": "" , "redirects": "",
"exsentences" : 2, "rawcontinue" : 1, "format" : "json", "titles" : query } "exsentences" : 2, "continue" : "", "format" : "json", "titles" : query }
apiurl = "https://%s.wikipedia.org/w/api.php?%s" % (lang, urllib.parse.urlencode(api)) apiurl = "https://%s.wikipedia.org/w/api.php?%s" % (lang, urllib.parse.urlencode(api))
try: try: