Skip to content

Instantly share code, notes, and snippets.

@icaromh
Last active May 6, 2017 15:19
Show Gist options
  • Save icaromh/9b06c52cfb4d956a2d8e to your computer and use it in GitHub Desktop.
Save icaromh/9b06c52cfb4d956a2d8e to your computer and use it in GitHub Desktop.
var Nightmare = require('nightmare');
var username = '';
var password = '';
new Nightmare()
.viewport(800, 600)
.goto('https://instagram.com/accounts/login/')
.wait()
.type('[name=username]', username)
.type('[name=password]', password)
.click('.-cx-PRIVATE-LoginForm__loginButton')
.wait()
.click('.-cx-PRIVATE-PostInfo__likeButton')
.screenshot('./insta.png')
.run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment