pyTweetBot.tweet package

Submodules

pyTweetBot.tweet.GoogleNewsHunter module

class pyTweetBot.tweet.GoogleNewsHunter.GoogleNewsHunter(search_term, lang, country, hashtags, languages, n_pages=2)

Bases: pyTweetBot.tweet.Hunter.Hunter

An hunter for Google News

next()

Next element

Returns:
The next tweet

pyTweetBot.tweet.Hunter module

class pyTweetBot.tweet.Hunter.Hunter

Bases: object

next()

pyTweetBot.tweet.RSSHunter module

class pyTweetBot.tweet.RSSHunter.RSSHunter(stream)

Bases: pyTweetBot.tweet.Hunter.Hunter

Find new tweets from RSS streams

get_stream()

Get stream

next()

Next :return:

pyTweetBot.tweet.Tweet module

class pyTweetBot.tweet.Tweet.Tweet(text, url, hashtags=None)

Bases: object

MAX_LENGTH = 280
already_tweeted()

Already tweeted? :return: True/False

get_length()

Get Tweet length :return:

get_text()

Get Tweet’s text. :return: Tweet’s text.

get_tweet()

Get Tweet :return: Complete Tweet’s text

get_url()

Get Tweet’s URL :return: Tweet’s URL

set_text(text)

Set Tweet’s text :param text: :return:

set_url(url)

Set Tweet’s URL :param url: :return:

pyTweetBot.tweet.TweetFactory module

pyTweetBot.tweet.TweetFinder module

class pyTweetBot.tweet.TweetFinder.TweetFinder(shuffle=False, tweet_factory=None)

Bases: pyTweetBot.tweet.Hunter.Hunter

Find new tweets from a set of sources (Google News, RSS)

add(hunter)

Add an hunter to the list :param hunter: The hunter object to add.

next()

Next tweet. :return: The next found tweet.

next_source()

Go to next source

remove(hunter)

Remove hunter :param hunter: The hunter object to remove.

set_factory(tweet_factory)

Set the tweet factory :param tweet_factory: The tweet factory

pyTweetBot.tweet.TweetPreparator module

class pyTweetBot.tweet.TweetPreparator.TweetPreparator(hashtags=None)

Bases: object

Tweet preparator

pyTweetBot.tweet.TwitterHunter module

class pyTweetBot.tweet.TwitterHunter.TwitterHunter(search_term, hashtags, n_pages=2, polarity=0.0, subjectivity=0.5, languages=['en'])

Bases: pyTweetBot.tweet.Hunter.Hunter

This class of hunter will find new tweets by scanning URLs in other user’s tweets found in research results.

get_hashtags()

Get hashtags

next()

Next :return: The next tweet found.

Module contents