#!/usr/bin/python import sys import time import random import simplejson from twibots import tb, sources, filters, channels from twibots import tools tb.Channel.fake = True twibot = tb.Twibot() tools.enable_debug() access_tokens = tools.file_auth() twitter = tools.twitter_auth(access_tokens) rss = sources.RssFeed( feed_url="http://www.google.com/reader/public/atom/user/08886841141873836783/state/com.google/broadcast", count=10 ) twitter.filters.append(filters.NoRetweets()) twitter.filters.append(filters.NoDuplicates()) twitter.filters.append(filters.Bitly(username="******", api_key="R_9f3bde0c5e2d36a3e747490bb37a6d5d")) twitter.filters.append(filters.InlineHashtags()) twitter.filters.append(filters.TagsToHashtags()) twitter.filters.append(filters.YouTubeEmbed()) twitter.filters.append(filters.Trim140(max_length=100)) twibot.sources.append(rss) twibot.channels.append(twitter)
$ python techbrother.py --auth authfile.auth --debug --fake This will generate a techbrother.log file with all the debug entries, and it will not use your Twitter account to actually tweet (fake). """ import logging import threading import sys import time import random import simplejson from twibots import tb, sources, filters, channels from twibots import tools # Enable --debug argument tools.enable_debug(log_filename='techbrother.log') # Enable --auth file.auth argument access_tokens = tools.file_auth() # Initialize the twitter channel using the access_tokens from file_auth(). twitter = tools.twitter_auth(access_tokens) # Sources to round-robin. rss_sources = [ 'http://mashable.com/feed', 'http://techcrunch.com/feed', 'http://kovshenin.com/feed', 'http://theme.fm/feed', 'http://www.inspiredm.com/feed/', 'http://rss1.smashingmagazine.com/feed/',
$ python techbrother.py --auth authfile.auth --debug --fake This will generate a techbrother.log file with all the debug entries, and it will not use your Twitter account to actually tweet (fake). """ import logging import sys import time import random import simplejson from twibots import tb, sources, filters, channels from twibots import tools # Enable --debug argument tools.enable_debug(log_filename='nexusrumors.log') # Enable --auth file.auth argument access_tokens = tools.file_auth() # Initialize the twitter channel using the access_tokens from file_auth(). twitter = tools.twitter_auth(access_tokens) # Sources to round-robin. rss_sources = [ 'http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&q=google+nexus&cf=all&scoring=n&output=rss', 'http://news.search.yahoo.com/rss?ei=UTF-8&p=google+nexus&fr=news-us-ss&sort=time', ] # Create our robot. twibot = tb.Twibot()
#!/usr/bin/python """ Twibots @wpnoodles Example """ import logging import sys import time import random import simplejson from twibots import tb, sources, filters, channels from twibots import tools # Enable --debug argument tools.enable_debug(log_filename="wpnoodles.log") # Enable --auth file.auth argument access_tokens = tools.file_auth() # Initialize the twitter channel using the access_tokens from file_auth(). twitter = tools.twitter_auth(access_tokens) class WordPressPlugins(tb.Source): """ Require: pyquery """ def __init__(self, prefix="New #WordPress Plugin:"): self.revision = 0