def post_tweet(api):
        conn = sqlite3.connect(DATABASE)
        conn.row_factory = sqlite3.Row
        c = conn.cursor()
        c.execute('CREATE TABLE IF NOT EXISTS RSSContent (`url`, `title`, `dateAdded`)')

	for feed in FEEDS:
		parsed_feed = feedparser.parse(feed.get_url())

		for entry in parsed_feed.entries:

			c.execute('SELECT * FROM RSSContent WHERE url=?', (entry.link,))
			if not c.fetchall():
				data = (entry.link, entry.title, time.strftime("%Y-%m-%d %H:%M:%S", entry.updated_parsed))
        			c.execute('INSERT INTO RSSContent (`url`, `title`, `dateAdded`) VALUES (?,?,?)', data)

                		hashtag_length = len(feed.get_hashtag())                		
				body_length = TWEET_NET_LENGTH - hashtag_length

                		tweet_body = entry.title.encode('utf-8')[:body_length]				
				tweet_url = entry.link.encode('utf-8')
		                tweet_hashtag = feed.get_hashtag()
                		
				tweet_text = (tweet_body, tweet_url, tweet_hashtag) % "%s %s %s"
                		tweet_media = media(feed, entry)

			        if tweet_media is not None:
                			api.update_with_media(tweet_media, tweet_text)
        			else:
                			api.update_status(tweet_text)

                		print " ", time.strftime("%c"), "-", tweet_text
                		
        conn.commit()
	conn.close()
dataset/ETHPy150Open housed/feedr/src/main.py/post_tweet/swapped operands of `%`