import MySQLdb

@@ -7,9 +7,838 @@
  MySQLdb
+, feedparser%0Asql = MySQLdb.connect(host=%22localhost%22, # your host, usually localhost%0A                            user=%22root%22, # your username%0A                            passwd=%22%22, # your password%0A                            db=%22agnes%22) # name of the data base%0Arss_url = %22%22%0Afeed = feedparser.parse(url)%0Aitems = feed %5B 'items' %5D%0Ai = 0%0Awhile i %3C len(items):%0A    if sql.query('SELECT * FROM bbcfeeds WHERE url=' + items%5Bi%5D%5B'link'%5D + ' AND  date=' + items%5Bi%5D%5B'published'%5D ) == '':%0A      sql.query('INSERT INTO news_log ' + items%5Bi%5D%5B'link'%5D + ',' + items%5Bi%5D + ',' + items%5Bi%5D%5B'summary'%5D + ',' + (len(items) - i) * 4)%0A    else:%0A        curpoints = sql.query('SELECT FROM points WHERE url = ' + items%5Bi%5D%5B'link'%5D)%0A        sql.query('UPDATE url = ' + items%5Bi%5D%5B'link'%5D + ' INSERT points ' + intcurpoints + curpoints * 1.002)%0A    i = i + 1%0A%0A%0A
 %0A

Update rss_log.py