BroBeur Tweet

Sends tweets for brobeur


In [53]:
from TwitterFollowBot import TwitterBot
import praw
import random

In [54]:
my_bot = TwitterBot()

In [56]:
r = praw.Reddit('brobeurtweet')

In [57]:
subredz = ['DevBlogs', 'gamedev', 'gamejams', 'Games', 'gaming']

In [58]:
randsubrepo = random.choice(subredz)

In [59]:
hashthi = ('#' + randsubrepo)

In [60]:
rgvz = r.get_subreddit(randsubrepo)

In [61]:
rgtnew = rgvz.get_new

In [62]:
ransub = rgvz.get_random_submission()

In [63]:
rantit = ransub.title

In [ ]:


In [64]:
randurl = ransub.url

In [65]:
my_bot.send_tweet(rantit + ' ' + randurl + ' '  + hashthi)


Out[65]:
{'contributors': None,
 'coordinates': None,
 'created_at': 'Sat Aug 08 10:46:02 +0000 2015',
 'entities': {'hashtags': [{'indices': [77, 86], 'text': 'DevBlogs'}],
  'symbols': [],
  'urls': [{'display_url': 'eepurl.com/brajuT',
    'expanded_url': 'http://eepurl.com/brajuT',
    'indices': [54, 76],
    'url': 'http://t.co/2b6IpnpKTH'}],
  'user_mentions': []},
 'favorite_count': 0,
 'favorited': False,
 'geo': None,
 'id': 629966793390452736,
 'id_str': '629966793390452736',
 'in_reply_to_screen_name': None,
 'in_reply_to_status_id': None,
 'in_reply_to_status_id_str': None,
 'in_reply_to_user_id': None,
 'in_reply_to_user_id_str': None,
 'is_quote_status': False,
 'lang': 'en',
 'place': None,
 'possibly_sensitive': False,
 'retweet_count': 0,
 'retweeted': False,
 'source': '<a href="http://brobeur.com" rel="nofollow">brobeurtweet</a>',
 'text': 'Blacksea Odyssey (Space Fishing Shooter): New Enemies http://t.co/2b6IpnpKTH #DevBlogs',
 'truncated': False,
 'user': {'contributors_enabled': False,
  'created_at': 'Sat Mar 30 01:44:05 +0000 2013',
  'default_profile': False,
  'default_profile_image': False,
  'description': 'Video Game Development.',
  'entities': {'description': {'urls': []},
   'url': {'urls': [{'display_url': 'brobeur.com',
      'expanded_url': 'http://brobeur.com',
      'indices': [0, 22],
      'url': 'http://t.co/KRO9XPRA01'}]}},
  'favourites_count': 4,
  'follow_request_sent': False,
  'followers_count': 509,
  'following': False,
  'friends_count': 1152,
  'geo_enabled': False,
  'has_extended_profile': False,
  'id': 1315550370,
  'id_str': '1315550370',
  'is_translation_enabled': False,
  'is_translator': False,
  'lang': 'en',
  'listed_count': 14,
  'location': 'Hamilton, New Zealand',
  'name': 'BroBeur.com',
  'notifications': False,
  'profile_background_color': 'C0DEED',
  'profile_background_image_url': 'http://abs.twimg.com/images/themes/theme1/bg.png',
  'profile_background_image_url_https': 'https://abs.twimg.com/images/themes/theme1/bg.png',
  'profile_background_tile': False,
  'profile_banner_url': 'https://pbs.twimg.com/profile_banners/1315550370/1431862528',
  'profile_image_url': 'http://pbs.twimg.com/profile_images/487211737284739072/HBzP949-_normal.png',
  'profile_image_url_https': 'https://pbs.twimg.com/profile_images/487211737284739072/HBzP949-_normal.png',
  'profile_link_color': '300808',
  'profile_sidebar_border_color': 'C0DEED',
  'profile_sidebar_fill_color': 'DDEEF6',
  'profile_text_color': '333333',
  'profile_use_background_image': True,
  'protected': False,
  'screen_name': 'brobeur',
  'statuses_count': 490,
  'time_zone': 'Auckland',
  'url': 'http://t.co/KRO9XPRA01',
  'utc_offset': 43200,
  'verified': False}}

In [66]:
my_bot.auto_rt("#gamejams", count=1)

In [67]:
my_bot.auto_follow("#gamedev", count=1)


followed abinash_assam

In [ ]: