talymo / instaautomate Goto Github PK
View Code? Open in Web Editor NEWAutoHotKey script that automates Instagram actions.
AutoHotKey script that automates Instagram actions.
Hi @talymo , Thanks for sharing
Your code and strategy is great but I found some errors. Maybe 1 year after, some tags changed. But the rest is great... So I decide to "reproduce" it in my TagIE editor (https://github.com/adegard/TagIE.ahk), and also to simplify it for people.
here is my code, with my TagIE function...
#include TagIE.ahk
;Like and Follow for posts on Hashtags:
;launch it daily on 2-5 posts and for 5 to 10 hashtag
;(you must save password before)
;put hashtag list (one by row) in a file: \hashtags.txt
;(search correlate hashtag from https://www.all-hashtag.com)
;original idea from @talymo https://github.com/talymo/instaAutomate
;@adegard - Works with TagIE version 1.1.04 (please check yours)
; Get list of hashtags from hashtags.txt
hashtags := Object()
Loop, read, % A_ScriptDir "\hashtags.txt"
hashtags[A_Index] := A_LoopReadLine
; How many posts we want to like
Posts = 3
; How many posts we have liked
LikedPosts = 0;
; Set Variables for Like action Interval (x100 millisec)
low = 2
high = 40
For i in hashtags {
; The hashtag we want to like
hash := hashtags[i]
StringReplace , hash, hash, %A_Space%,,All
HashTag := hash
; Stuff we need for the script to work
myUrl = https://www.instagram.com/explore/tags/%HashTag%/
tnav(myUrl,"")
Sleep 3000
; Loop through n posts
Loop, %Posts% {
selector =#react-root > section > main > article > div.EZdmt > div > div > div:nth-child(2) > div:nth-child(%A_Index%) > a > div > div._9AhH0
tclick(selector)
Random, Time_To_Wait, low, high
Sleep, Time_To_Wait * 100
;heart clicking
tclick("glyphsSpriteHeart__outline__24__grey_9 u-__7")
Random, Time_To_Wait, low, high
Sleep, Time_To_Wait * 100
;click on Follow
tclick("oW_lN _0mzm- sqdOP yWX7d ")
;cancel action to avoid unfollow
tclick("aOOlW HoLwm ")
Random, Time_To_Wait, low, high
Sleep, Time_To_Wait * 100
;close post
tclick("ckWGn")
}
}
Sleep, 5000
pwb.Quit()
ExitApp
Esc::ExitApp
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.