diff --git a/module_red.py b/module_red.py index cf5b1c6c3a771d4f57e12d2dc40e244828df396a..771c9ce82a92ce202ef43c5d3d5adafe7c3e763f 100644 --- a/module_red.py +++ b/module_red.py @@ -64,12 +64,14 @@ def joke(arg = "", full= False, link = 0 ) : subs = subreddit.get_hot(limit = 100) subs = list(subs) + sub = subs[a] - titre = (subs[a]).title - texte = (subs[a]).selftext + print sub.keys() + titre = sub.title + texte = sub.selftext if len(texte) > 100 and not full : texte = texte[:100] + "[...]" - url = (subs[a]).short_link + url = sub.short_link texte = texte+ " | url : "+url if titre in texte :