GithubHelp home page GithubHelp logo

ninjayoto / auto-poster Goto Github PK

View Code? Open in Web Editor NEW

This project forked from michielst/auto-poster

0.0 1.0 0.0 143 KB

Automatically post images from a subreddit to an instagram account.

Shell 1.15% TypeScript 98.85%

auto-poster's Introduction

auto-poster

Automatically post images from a subreddit to an instagram account.

Setup

  1. Create a copy of the .env.example file to .env and enter your environment variables.
  2. Create a settings.json file in the root with your account credentials. Example:
{
    "accounts": [
        {
            "instagramUsername": "",
            "instagramPassword": "",
            "subreddit": "",
            "tags": "",
            "postOnStory": false,
            "credits": true
        }
    ]
}
  1. Run the following commands:
npm install
npm start

Setup via cron (linux)

  1. Make the cron scrip executable.
chmod +x /home/ubuntu/projects/auto-poster/cron.sh
  1. Add this to your crontab using crontab -e. This will run the script every 12 hours.
0 */12 * * * sh /home/ubuntu/projects/auto-poster/cron.sh

What to do when receiving challenges

When supsicious behaviour is found on your account, Instagram will provide a challenge for you to complete. This can be a verification via SMS or email (Whichever is linked to your account). The bot will not be able to post when this is happening.

To fix this:

  • Sign into the account with your phone and verify via SMS.
  • Delete the {account}_cookies.json for this account.
  • Run the verifier script npm run verifier <username>. This will send a verification request to your email with a code that you have to enter in the command prompt. (This will also create a new cookies.json file for this account)
  • Run npm start again.

auto-poster's People

Contributors

gregorystrbt avatar michielst avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.