From e7606b35bb5ec7ff80d3fc194394d3020764e537 Mon Sep 17 00:00:00 2001
From: Loris TICHADOU <loris.tichadou@ensiie.fr>
Date: Fri, 12 Jul 2019 16:57:39 +0200
Subject: [PATCH] Update module_red.py

---
 module_red.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/module_red.py b/module_red.py
index cf5b1c6..771c9ce 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 :
-- 
GitLab