small fix

This commit is contained in:
2015-02-06 14:14:05 +01:00
committed by urlbot
parent 438eb13ec2
commit 15225377d7

View File

@@ -533,7 +533,7 @@ 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": "" , api = { "action" : "query", "prop" : "extracts", "explaintext": "" , "redirect": "",
"exsentences" : 2, "rawcontinue" : 1, "format" : "json", "titles" : query } "exsentences" : 2, "rawcontinue" : 1, "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))
@@ -555,7 +555,7 @@ def command_wp(argv,lang="de",**args):
if short is not None: if short is not None:
return { return {
'msg': args['reply_user'] + ': %s (<%s>)' % ( 'msg': args['reply_user'] + ': %s (<%s>)' % (
short if short.strip() else nix, link short if short.strip() else "(nix)", link
) )
} }
else: else: