Giter Site home page Giter Site logo

like-my-friend's Introduction

Like My Friend

like-my-friend is a tool to look at the latest instagram feed for a user, and like their photos automatically without having to enable post notifications etc. It is inspired by this javascript tool and this python tool, but written in Go.

Usage

Run the binary with a few command line options. The help output is below:

If your friend likes you to be quick to like their photos,
this app will poll the latest feed, determine if you've liked their feed recently
and like the photo if you haven't

Usage:
  like-my-friend [flags]

Flags:
  -a, --account string    The instagram account to watch
      --config string     config file (default is $HOME/.like-my-friend.yaml)
  -d, --dryrun            Show what photos you'd like
  -p, --password string   The password for your account
  -P, --posts int         Number of posts to like (default 10)
  -u, --username string   The username for your account

Environment Variables

Because the app uses viper & cobra, you can use environment variables easily. Simple set them using the prefix INSTA_:

export INSTA_USERNAME="jaxxstorm"
export INSTA_PASSWORD="my-password"
export INSTA_ACCOUNT="my-friend"
like-my-friend

Building

If you want to contribute, we use glide for dependency management, so it should be as simple as:

cloning this repo into $GOPATH/src/github.com/jaxxstorm/like-my-friend run glide install from the directory run go build -o hookpick main.go

like-my-friend's People

Contributors

jaxxstorm avatar

Watchers

 avatar  avatar

like-my-friend's Issues

Can't get or build go package

Seems to be an issue with a dependent package but I'm not sure how to fix this.
Package https://github.com/ahmdrz/goinsta

go get github.com/jaxxstorm/like-my-friend

github.com/jaxxstorm/like-my-friend/cmd

src\github.com\jaxxstorm\like-my-friend\cmd\root.go:75:23: insta.GetUserByUsername undefined (type *goinsta.Instagram has no field or method GetUserByUsername)
src\github.com\jaxxstorm\like-my-friend\cmd\root.go:86:21: insta.LatestUserFeed undefined (type *goinsta.Instagram has no field or method LatestUserFeed)
src\github.com\jaxxstorm\like-my-friend\cmd\root.go:97:21: insta.Like undefined (type *goinsta.Instagram has no field or method Like)

go build github.com/jaxxstorm/like-my-friend

github.com/jaxxstorm/like-my-friend/cmd

src\github.com\jaxxstorm\like-my-friend\cmd\root.go:75:23: insta.GetUserByUsername undefined (type *goinsta.Instagram has no field or method GetUserByUsername)
src\github.com\jaxxstorm\like-my-friend\cmd\root.go:86:21: insta.LatestUserFeed undefined (type *goinsta.Instagram has no field or method LatestUserFeed)
src\github.com\jaxxstorm\like-my-friend\cmd\root.go:97:21: insta.Like undefined (type *goinsta.Instagram has no field or method Like)

Liking only the last photo

How would I change the program to only like the latest photo from a user (LatestUserFeed) instead of the first 18 photos from a user?
Is there a sample config file that might have these options?

I really appreciate the help. Thank you.

Usernamelist.txt file for user input

Thank you very much for being so responsive and making changes so quickly. The new v0.2 code works as advertised and works well.

I guess I had a different use case in mind where I wanted to like a bunch of my friends latest posts. I have a list of user accounts that I want to like their latest post. Using a batch file like the following caused issues with Instagram. After about 8 user accounts the error "Not Logged In" showed up for each line item. I assume because the script logs into Instagram for every user. I wondered if I could change the code to input the user account list (text file) in the code and thus only log in once for multiple likes.

I created a batch file with the following command:
FOR /f "delims=" %%U in (usernamelist.txt) DO like-my-friend -a %%U -u InstaAccount -p InstaPassword -P 1

This worked fine except for logging in too much for Instagram.

I'm not sure if this is something I can ask for or whether I need to figure it out myself. I was hoping to get the usernamelist.text into the for loop.

Thoughts?

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.