catfacts: append fact ID
parent
a72baa47b2
commit
aefd3bbe3f
|
@ -10,7 +10,7 @@ def catfacts_ajax():
|
||||||
def catfacts_get():
|
def catfacts_get():
|
||||||
fact = catfacts_ajax()
|
fact = catfacts_ajax()
|
||||||
try:
|
try:
|
||||||
return fact['factoid']
|
return "{0} (#{1:d})".format(fact['factoid'], fact['id'])
|
||||||
except IndexError:
|
except IndexError:
|
||||||
return None
|
return None
|
||||||
except TypeError:
|
except TypeError:
|
||||||
|
|
Loading…
Reference in New Issue