aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlas Oliva <blasoliva@gmail.com>2015-01-20 00:56:44 -0300
committerBlas Oliva <blasoliva@gmail.com>2015-01-20 00:56:44 -0300
commit8e422a2578bbb94fd45f3fdd93f054382a3fb172 (patch)
tree95eb14044e52fe11955f0e25ba710cdbbcf695d1
parenta02eea6c2e02aea6ba27669437e3535ddfc6314f (diff)
downloadreebot-8e422a2578bbb94fd45f3fdd93f054382a3fb172.tar.gz
reebot-8e422a2578bbb94fd45f3fdd93f054382a3fb172.zip
Deployment MongoDB
-rwxr-xr-xrbot.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/rbot.py b/rbot.py
index 7d8bf3c..53b9edb 100755
--- a/rbot.py
+++ b/rbot.py
@@ -95,12 +95,17 @@ class rBot:
95 95
96 # Loop over feeds entries 96 # Loop over feeds entries
97 for entry in feeds.entries: 97 for entry in feeds.entries:
98 url = entry.link.encode( 'utf-8','ignore' ) 98
99 url = entry.link
100 ftitle = feeds.feed.title
101 link = entry.link
102
99 if self.db.log.find_one( { "url" : url } ) is None: 103 if self.db.log.find_one( { "url" : url } ) is None:
100 msgqueue.append( feed['name'] 104 msgqueue.append( feed['name']
101 + " | " + feeds.feed.title.encode( 'utf-8','ignore' ) 105 + " | " + ftitle
102 + " > " + entry.title.encode( 'utf-8','ignore' ) 106 + " > " + title
103 + " : " + entry.link.encode( 'utf-8','ignore' ) ) 107 + " : " + link )
108 #
104 self.db.log.insert( { "url" : url } ) 109 self.db.log.insert( { "url" : url } )
105 110
106 while len( msgqueue ) > 0: 111 while len( msgqueue ) > 0: