aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBlas Oliva <blasoliva@gmail.com>2015-01-20 01:11:06 -0300
committerBlas Oliva <blasoliva@gmail.com>2015-01-20 01:11:06 -0300
commit622efa8322c8570415cf0bef0b368154c3aff536 (patch)
treebfd8f78493887d67e93d80cf0cc93b3562ccc5ae
parent7506885c5a526c5628de536aaa2de037f542f5df (diff)
downloadreebot-622efa8322c8570415cf0bef0b368154c3aff536.tar.gz
reebot-622efa8322c8570415cf0bef0b368154c3aff536.zip
Deployment MongoDB
-rwxr-xr-xrbot.py17
1 files changed, 5 insertions, 12 deletions
diff --git a/rbot.py b/rbot.py
index c301bf6..34d22e4 100755
--- a/rbot.py
+++ b/rbot.py
@@ -95,19 +95,12 @@ 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 98 if self.db.log.find_one( { "url" : entry.link.encode( 'utf-8' ) } ) is None:
99 url = entry.link
100 ftitle = feeds.feed.title
101 title = entry.title
102 link = entry.link
103
104 if self.db.log.find_one( { "url" : url } ) is None:
105 msgqueue.append( feed['name'] 99 msgqueue.append( feed['name']
106 + " | " + ftitle 100 + " | " + feeds.feed.title.encode( 'utf-8' )
107 + " > " + title 101 + " > " + entry.title.encode( 'utf-8' )
108 + " : " + link ) 102 + " : " + entry.link.encode( 'utf-8' ) )
109 # 103 self.db.log.insert( { "url" : entry.link.decode( 'utf-8' ) } )
110 self.db.log.insert( { "url" : url } )
111 104
112 while len( msgqueue ) > 0: 105 while len( msgqueue ) > 0:
113 msgq = msgqueue.pop() 106 msgq = msgqueue.pop()