From b56f9fb7612d5ab32c2a77fa47ef012b447b4be6 Mon Sep 17 00:00:00 2001 From: yvesf Date: Mon, 7 Dec 2009 08:22:55 +0000 Subject: foobar git-svn-id: http://xapek.org/svn/common/omegle@1477 d0e8fea9-7529-0410-93fb-d39fd5b9c1dd --- unfoggedbot.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'unfoggedbot.py') diff --git a/unfoggedbot.py b/unfoggedbot.py index 4c943ba..19362da 100644 --- a/unfoggedbot.py +++ b/unfoggedbot.py @@ -1,12 +1,12 @@ #! /usr/bin/python -#from twisted.words.protocols import oscar -import oscar +from twisted.words.protocols import oscar +#import oscar ## local copy taken from the py-aimt project. ## some API differences, but it automagically does rate-limiting stuff. from twisted.internet import protocol, reactor from twisted.enterprise.adbapi import ConnectionPool from twisted.python import log -import re, feedparser, socket, sets, os +import re, socket, sets, os #socket.setdefaulttimeout(60) @@ -21,7 +21,7 @@ GETSUBSCRIBERS = "SELECT screen_name FROM subscriptions WHERE thread_url = ?" INSERTCOMMENTS = "INSERT OR IGNORE INTO rss_items (link, processed, thread_url, author, content, title) VALUES (?, ?, ?, ?, ?, ?)" INSERTPOSTS = "INSERT OR IGNORE INTO posts (post_url, title, processed) VALUES (?, ?, ?)" -db = ConnectionPool("pysqlite2.dbapi2", DB) +db = None permalink = re.compile("http://(www\.)?unfogged\.com/archives/week_...._.._..\.html#(\d+)") commentlink = re.compile("http://(www\.)?unfogged\.com/archives/comments_(\d+).html") @@ -208,8 +208,6 @@ class ReconnectingOSCARLoginFactory(protocol.ReconnectingClientFactory): def getrss(): ##on the assumption that this can be done w/o using too much time, ##I have taken this out of a separate thread. - comments = feedparser.parse("/home/unfogged/unfogged/html/bridgeplate.rdf") - posts = feedparser.parse("/home/unfogged/unfogged/html/index.xml") updaterss(comments, posts) reactor.callLater(15, getrss) @@ -230,7 +228,7 @@ def updaterss(comments, posts): if __name__ == '__main__': - execfile(RC) # values of "sn" and "pass_" + sn,pass_="aa","bb" import sys sys.stderr = sys.stdout = open("ubot.log", "a+") log.startLogging(sys.stdout) -- cgit v1.2.1