Skip to content

amamenko/daily-pixel-mike

Repository files navigation

MIT License LinkedIn


Logo

Daily Pixel Mike

Automated Daily Instagram Posts with Node.js, Express, and TypeScript

Report Issue · Follow @dailypixelmike

Overview

This project is an Express server that posts the same locally-stored picture of Pixel Mike Wazowski to the @dailypixelmike Instagram page every day at 12 PM Eastern Time via node-cron and instagram-web-api. The image is in JPG format since that is Instagram's default format for images. Any other image format will be converted to JPG by Instagram and hence lose some of its quality in the conversion process.

Every post includes a custom caption that includes Pixel Mike's "feeling" of the day. This "feeling" is a random adjective or adverb generated by wordpos, which pulls lexicographic data from WordNet online. Each caption also includes a definition for the adjective or adverb, which is also provided by wordpos and parsed to make a complete sentence. Additional hashtags are also included in an automated comment by @dailypixelmike on each of @dailypixelmike's daily Instagram posts.

The server initially logs in to Instagram with a username and password. It then persists the authenticated cookies in a cookie store via tough-cookie-filestore2 for future use. The server is deployed to Heroku and the Heroku dyno kept awake with UptimeRobot.

I have also created a YouTube tutorial for this project. It includes configuring Heroku, setting up an Instagram client, and configuring a cookie store.

Local Development

To set up this project locally, you can follow the steps below.

Prerequisites

You will need to have the following software installed:

  • npm
  • Git
  • Node.js

Installation

  1. Create your own Instagram account.
  2. Clone the Github repository.
    git clone https://github.com/amamenko/daily-pixel-mike.git
  3. Install all server-side NPM packages.
    npm install
  4. Add your server-side environment variables.
    INSTAGRAM_USERNAME=YOUR INSTAGRAM USERNAME
    INSTAGRAM_PASSWORD=YOUR INSTAGRAM PASSWORD 
  5. Start the local server.
    npm start

Contributing

Contributions are welcome!

  1. Fork the project.
  2. Create your feature branch (git checkout -b feature/MyFeature).
  3. Commit your changes (git commit -m 'Add my feature').
  4. Push to the branch (git push origin feature/MyFeature).
  5. Open a pull request.

License

Distributed under the MIT License. See LICENSE.txt for more information.

Contact

Avraham (Avi) Mamenko - avimamenko@gmail.com

Project Link: https://github.com/amamenko/daily-pixel-mike

Acknowledgements

Releases

No releases published

Packages

No packages published