GithubHelp home page GithubHelp logo

tktk-ml / np_instagram_bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rmartinshort/np_instagram_bot

0.0 0.0 0.0 32.15 MB

An automated tool that scrapes national park instagram images and reposts

Python 100.00%

np_instagram_bot's Introduction

Np_instagram_bot

An automated tool that scrapes national park instagram images and reposts

Function

This tool is designed to scape recent posts from any number of instagram accounts (account names and id numbers in data/national_park_instaids.csv). It ranks the posts based on a weighted sum of likes/follower/day and comments/follower/day, performs QC and then chooses an image to repost.

It will also design a caption for reposting. It can be instructed to automatically post at a user-provided frequency.

Use

The driver script is called run_download.py. This contains driver functions for extacting and saving the current status of the instagram profiles we repost from, deleting outdated posts in our repo, downloading new posts, designing a new post and actually putting it online.

All the user-defined parameters are set in config.py

datadownloaders.py: Classes for obtaining images and organizing their metadata
preprocessing.py: Classes for generating features, post QC, designing new captions etc.
pipeline.py: The processing pipleline. We try to keep the steps in an sklearn pipeline format as far as possible
ProfileManip.py: This is not actually needed, but will gather metadata about the profiles themselves and save to a file
bot_script.py: Uses instabot_py to like, follow and unfollow other profiles. Run this in the background. MyProfileLogger.py: Extra script that can be run in the background to get the number of likes, followers etc for your profile at user-defined time intervals

How to run

  • Adjust parameters in config.py to your liking
  • Run bot_script.py in the background
  • Run run_download.py. Every x hours, a post will be generated
  • Run MyProfileLogger.py to log performance of the profile

Ideas/to-do list

  • Logging followers of the profile though time - how do people respond to different content?
  • Choose content based on recent history of responses to previous posts
  • Image classification for better caption design
  • Style transfer for artistic images
  • NLP on the original captions and comments to try to extract sentiment/improve captioning

np_instagram_bot's People

Contributors

rmartinshort 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.