The 2020 version of Dylan's winter week bot from 2019. I forked his repository and modified my automation off of his original code.
Shortcuts: About, Repository Navigation, Run The Automation, Demo, Further Hacking.
This repository contains the code for multiple automatic bots for posting the #msjww20 hashtag on Instagram.
Here is a quick guide to the MSJWWBot 2020 repository. If you are looking for a specific file or want to know what each file is for, this should help you.
runbotwindows.py
is the original bot from msjwwBot, which runs on Windows OS devices. I have modified it slightly to post an up to date photo and caption. This is also the file with heavily detailed comments — chances are if there is something that is uncommented and does not make too much sense in the other files, the information you need is probably in a comment in this file.runbotmacos.py
is the original bot from msjwwBot, which runs on MacOS devices. I have modified it slightly to post an up to date photo and caption.runbotall.py
is a modified version ofrunbotwindows.py
. This bot aims to spread winter week spirit by posting for other schools as well.runbotspeed.py
is a modified version ofrunbotwindows.py
. This bot increases the speed at which images are posted to the Instagram account — best suited for a time crunch.runbotspeedcomments.py
is a modified version ofrunbotspeed.py
. Think of this as the ultimate final form of the bot. In addition to an increased posting time, this bot also includes a variety of randomized comments.
The directions below are directly copied from the msjwwBot repository and modified to fit MSJWWBot 2020.
Slight disclaimer: I use the Windows OS, but followed the MacOS instructions to run the automation because I already had Python installed.
- Check if Python is installed on your machine. Open a terminal window and type:
python --version
- If you receive an error, type:
python3 --version
- If you receive an error for both, install python from the link below. If a python version is displayed, skip the next step.
- Install Python at https://www.python.org/ftp/python/3.9.1/python-3.9.1-macosx10.9.pkg.
- Change directory to Desktop.
cd Desktop
- Clone this repository. If the below command does not work, you can manually download the zip file by pressing the
Download ZIP
option under the dropdown menu under the greenCode
button located in the top right corner of the page and move the unzipped folder to your Desktop.git clone https://github.com/kayleyseow/MSJWWBot-2020.git
- Change directory to MSJWWBot-2020:
cd MSJWWBot-2020
- Install the instabot library.
pip install instabot
- Alternatively, if that doesn't work, run:
pip3 install instabot
- Alternatively, if that doesn't work, run:
- If you used pip3, type the below command with
python3
as opposed topython
.python runbot.py
- Follow the instructions on screen to log into an Instagram account you plan to automate.
- Install Conda from the following link: https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe.
- Type Miniconda into your Windows search bar located on the bottom left corner of your screen. Press enter. You should see a black, command-prompt like display.
- Create a conda virtual environment.
conda update conda conda create -n MSJWWBot-2020 python=3.6 pip
- Activate your environment.
conda activate MSJWWBot-2020
- Download this repository as a zip file. It should be located on the top right corner of the page and will show up after you click the green "Code" button.
- Unzip the folder.
- In your Conda terminal, change directory to the folder path. For example, if I am in C:/Users/xxx/ and my folder is located in Downloads, I would run:
cd Downloads/MSJWWBot-2020
- In your Conda terminal, install instabot.
pip install instabot
- Run the automation file and follow the instructions on screen.
python runbotwindows.py
From what I have seen, the captions for the automated posting stopped working at around 400 posts. Some examples of automated posting are @winter_week_2020 and @winter_week_2020_2.
- Automation can be modified for future use. In the code, only the caption and file names need to be changed — everything else should work flawlessly
- New Features:
- Display of the elapsed time of automation
- Quit function to break the automation out of the loop
- Set a number posts instead of having the automation run
- Expanding On Current Features:
- Addition of more comments
- Further randomized posting times
- For this automation, Instabot was used (only the
login()
function). To further expand on the automation, you can look through the Instabot docs and take a look through the Instabot instructions for use for the other functions and parameters in order to add functionality to the automation.