/BurbnBot

BurbnBot is a bot for automated interaction in a famous social media app using Android Virtual Devices.

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Kevin Systrom, the creativity researcher Keith Sawyer explains, was a
fan of Kentucky whiskeys. So when he created a location-based iPhone
app—one driven by the success of networking app Foursquare—he named it
after the booze. The app was complicated, but it took Systrom just a
few months to build: Burbn let users check in at particular locations,
make plans for future check-ins, earn points for hanging out with
friends, and post pictures of the meet-ups.
Instagram Was First Called 'Burbn'.

BurbnBot

BurbnBot is a bot for automated interaction in a famous social media app using an Android device or an Android Virtual Devices.

Requirements

Tested with:

Instagram release 173.0.0.39.120.

Installation

  1. Download and install Android platform tools.
  2. Clone the repo:
    git clone https://github.com/harrypython/BurbnBot.git
    cd BurbnBot 
  3. Install the requirements:
    pip install -r requirements.txt

Get started

  1. Connect an Android device with a USB cable or run an Android Virtual Device.
  2. Make sure you enabled adb debugging on your device(s).
  3. You can test the device with the command:
    adb devices 
    The output must be something like this
    List of devices attached
    AB12C3456789	device
    emulator-5554	device
  4. You can copy the example.py or create your script
    python example.py -d emulator-5554

Usage

from BurbnBot import Burbnbot

bot = Burbnbot()

# get the following list (take a long time)
users_following = bot.get_following_list()

# get the followers list (take a long time)
users_followers = bot.get_followers_list()

for user in [u for u in users_following if u not in users_followers]:
    # unfollow who don't follow you back
    bot.unfollow(username=user)

# open explorer session, follow 10 new  users
# and save the posts in a collection with name
# yyyy-mm-dd. This way you can check the users
# followed by the app
bot.follow_n_save(amount=10)

users_following = bot.get_following_list()
if len(users_following):
    for u in users_following:
        # Unfollow who hasn't made a new post for the past 90 days
        if bot.get_days_lastpost(username=u) > 90:
            bot.unfollow(username=u)

# Open hashtag's feed 'creative',
# check if the hashtag is banned
# move to Recent tab and
# click in the first picture
if bot.open_tag(tag="creative", tab="Recent", check_banned=True):
    # swipe and like 5 pictures do feed opened before
    bot.like_n_swipe(5)

# open the profile "badgalriri"
if bot.open_profile(username="badgalriri", open_post=True):
    # swipe and like 3 pictures do feed opened before
    bot.like_n_swipe(3)

# open the post https://www.instagram.com/p/B_nrbNPndh0/
if bot.open_media(media_code="B_nrbNPndh0"):
    bot.like_n_swipe()

# open home feed and like 15 posts
if bot.open_home_feed():
    bot.like_n_swipe(15)

# return the last users who interacted with you
notification_users = bot.get_notification_users()
for u in notification_users:
    if bot.open_profile(username=u):
        bot.like_n_swipe(1)  # like the last post from users who interacted with you

# return the hashtags followed by you
followed_hashtags = bot.get_followed_hashtags()
for hashtag in followed_hashtags:
    if bot.open_tag(tag=hashtag, tab="Recent"):  # open the hashtag feed in the 'Recent' tab
        bot.like_n_swipe(amount=10)  # like 10 posts

# like accounts you've interacted with the least in the last 90 days
usernames = bot.get_least_interacted()
for u in usernames:
    if bot.open_profile(username=u, open_post=True):
        bot.like_n_swipe(3)

Features

  • Open home feed
  • Login
  • Open post
  • Open location feed
  • Open profile
  • Open hashtag feed
  • List followings
  • List followers
  • List followed hashtags
  • Like and scroll an opened feed
  • Follow user
  • Unfollow user
  • How long ago the user last posted
  • Logout from other devices

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

GNU GPLv3

Buy me a coffee

Buy Me A Coffee