Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require "watir"
- #you would put in your username/password here
- username=
- password=
- #array for followed people
- followed= []
- # Open Browser, Navigate to login page
- browser = Watir::Browser.new :chrome
- browser.goto 'instagram.com/accounts/login/'
- # Navigate to username and password fields, inject info
- puts "Logging in..."
- browser.text_field(:name => "username").set "#{username}"
- browser.text_field(:name => "password").set "#{password}"
- #click the login button
- browser.button(:class => "_ah57t _84y62 _i46jh _rmr7s").click
- sleep (1)
- browser.goto("instagram.com/dvlp.r")
- browser.a(:href => '/dvlp.r/followers/').click
- #this is where I begin to mess up. I want to be able to scroll through users, add them to a list, and then click follow
- #only problem is, when you do these steps, instagram has all the followers in a new window. So window.ScrollBy doesnt work.
- sleep(20)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement