Created
June 29, 2022 05:33
-
-
Save udaragangabadage/b09b1608ae6009ab16e91046ec0d1857 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To determine the number of "likes," change the first line where j < 9 to whatever number you're aiming for. Very helpful when following a hashtag or after searching for a particular term. | |
for(var j = 1; j < 9; j++) { | |
for (const d of document.querySelectorAll('div[data-testid="like"]')) { | |
d.scrollIntoView(true); | |
d.click() | |
}} | |
If you are trying to 'unlike' instead of 'like' just change line 2: | |
for (const d of document.querySelectorAll('div[data-testid="unlike"]')) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment