Comments (4)
You mean you already have a specific list of usernames you want to unfollow without having to select them from the list?
from instagramunfollowers.
Exactly. I'm asking that because instagram temporarily prevented the unfollowing action, so I would like to resume it after a few hours.
from instagramunfollowers.
Sorry, but it'll be a bit tricky to implement.
The unfollow action required the id number of the user.
So a list of usernames doesn't get us far in this case unfortunately.
from instagramunfollowers.
Hello,
I'm documenting here the Javascript code that I created and may help other users. This code aims to check multiple pages of InstagramUnfollowers and select items corresponding to a list of username.
It performs the following steps:
- Define a list of username and the amount of pages to be checked.
- Create the
findInputByUsername
function to locate the input element corresponding to each username using XPath. - Create the
checkInput
function to evaluate theonchange
attribute of the found element and execute the corresponding code. - Iterate over each page and apply the above functions for each username in the list.
After all the users are selected, proceed with the normal flow by clicking UNFOLLOW
.
var usernames = [
/* Username list */
]
var pages = /* Page amount */;
function findInputByUsername(username) {
var xpath = "//a[text()='" + username + "']";
var matchingElement = document.evaluate(
xpath,
document,
null,
XPathResult.FIRST_ORDERED_NODE_TYPE,
null
).singleNodeValue;
if (matchingElement) {
return matchingElement
.parentElement
.parentElement
.parentElement
.getElementsByTagName('input')[0];
} else {
return false;
}
}
function checkInput(el) {
var exp = el.getAttribute('onchange');
eval(exp);
}
for (var index = 0; index < pages; index++) {
usernames.forEach(function(username) {
var el = findInputByUsername(username);
if (el) {
checkInput(el);
}
});
nextPage();
}
Thanks
from instagramunfollowers.
Related Issues (20)
- Checkbox not working HOT 2
- select all check box not working HOT 2
- Issue: Disabled 'Select All' Checkbox HOT 1
- Enhancement: Reduce time for -> Sleeping 5 minutes to prevent getting blocked HOT 7
- Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor' HOT 1
- (IDEA) Why not making a tool similiar for threads instead? HOT 3
- Cannot paste code in console HOT 14
- .. HOT 1
- When trying to paste the code: Can be used only on Instagram routes HOT 1
- no deja pegar el codigo en la consola HOT 4
- Preserve user list after unfollowing any
- Error 413
- . HOT 3
- Doesn't do anything HOT 4
- DIscord Token
- How to whitelist accounts HOT 2
- Select all button not working HOT 5
- How to edit sleeping time HOT 7
- EOL? HOT 8
- Safe to use? Maybe a workflow to generate the compressed code to index.html HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from instagramunfollowers.