Changes

Jump to: navigation, search

Ircbot

945 bytes removed, 20:50, 21 July 2013
/* Fix RSS */ fixed https://github.com/embolalia/willie/commit/fa5f8c6baada45e3b2a533ef6b2a14a82075cb63
su -c 'willie -w' irc-bot #configuration
su -c 'willie --fork' irc-bot #run in background
 
=== Fix RSS ===
* https://github.com/embolalia/willie/issues/304
<pre>
--- /tmp/willie/willie/modules/rss.py 2013-07-20 17:43:43.570496043 +0200
+++ /usr/local/lib/python2.7/dist-packages/willie/modules/rss.py 2013-07-20 19:54:21.564482921 +0200
@@ -11,6 +11,7 @@
import time
import re
import socket
+import base64, hashlib
import feedparser
@@ -355,10 +356,11 @@
bot.msg(feed_channel, message)
# save into recent
+ etag = base64.b64encode(hashlib.md5(entry.link).digest())
c.execute('''
UPDATE rss_feeds SET article_title = %s, article_url = %s, published = %s, etag = %s
WHERE channel = %s AND feed_name = %s
- ''' % (SUB * 6), (entry.title, entry.link, entry_dt, fp.etag, feed_channel, feed_name))
+ ''' % (SUB * 6), (entry.title, entry.link, entry_dt, etag, feed_channel, feed_name))
conn.commit()
c.close()
</pre>
== Plugins ==
ControlGroup, administrator
4,237
edits