aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlas Oliva <blasoliva@gmail.com>2015-01-20 00:42:37 -0300
committerBlas Oliva <blasoliva@gmail.com>2015-01-20 00:42:37 -0300
commit6af5ea6abd7ca79fe6611f646208d143ee4aceed (patch)
tree5106e07048f1a02238bf5c7eced6fc39ee81f0a7
parentf59500c25404050c1f3609485482fd193559e6ba (diff)
downloadreebot-6af5ea6abd7ca79fe6611f646208d143ee4aceed.tar.gz
reebot-6af5ea6abd7ca79fe6611f646208d143ee4aceed.zip
Deployment MongoDB
-rwxr-xr-xrbot.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/rbot.py b/rbot.py
index eb65ffa..9d27dde 100755
--- a/rbot.py
+++ b/rbot.py
@@ -95,12 +95,13 @@ 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 if self.db.log.find_one( { "url" : entry.link.encode( 'utf-8' ) } ) is None: 98 url = entry.link.encode( 'utf-8' )
99 if self.db.log.find_one( { "url" : url } ) is None:
99 msgqueue.append( feed['name'] 100 msgqueue.append( feed['name']
100 + " | " + feeds.feed.title.encode( 'utf-8' ) 101 + " | " + feeds.feed.title.encode( 'utf-8' )
101 + " > " + entry.title.encode( 'utf-8' ) 102 + " > " + entry.title.encode( 'utf-8' )
102 + " : " + entry.link.encode( 'utf-8' ) ) 103 + " : " + entry.link.encode( 'utf-8' ) )
103 self.db.log.insert( { "url" : entry.link.encode( 'utf-8' ) } ) 104 self.db.log.insert( { "url" : url } )
104 105
105 while len( msgqueue ) > 0: 106 while len( msgqueue ) > 0:
106 msgq = msgqueue.pop() 107 msgq = msgqueue.pop()