SimpleInstaBot icon indicating copy to clipboard operation
SimpleInstaBot copied to clipboard

Filter by country

Open stevenhardy-digital opened this issue 2 years ago • 10 comments

Is your feature request related to a problem? Please describe. Is it possible to filter by country?

Describe the solution you'd like The ability to filter by country when running the bot.

stevenhardy-digital avatar Aug 30 '22 15:08 stevenhardy-digital

What do you want to filter by country? And how would the bot do that exactly?

mifi avatar Aug 30 '22 15:08 mifi

Is there a way to filter users by country? Sorry for not being clear. For example, only follow users from the UK or Spain.

stevenhardy-digital avatar Aug 30 '22 15:08 stevenhardy-digital

How would the bot know which country users are from?

mifi avatar Aug 30 '22 15:08 mifi

What’s the endpoint you use to get the user’s profiles when searching? I know there’s a json response that may help.

stevenhardy-digital avatar Aug 30 '22 15:08 stevenhardy-digital

Is there a way to filter users by country? Sorry for not being clear. For example, only follow users from the UK or Spain.

It is not possible directly, but if they have added location to thier posts then possible.

PS; You can get users by location.

kingbotss avatar Sep 02 '22 00:09 kingbotss

Is there a way to filter users by country? Sorry for not being clear. For example, only follow users from the UK or Spain.

It is not possible directly, but if they have added location to thier posts then possible.

PS; You can get users by location.

Thank you @kingbotss

On research, it looks like you can match users if they have a location on their images. The media endpoint returns latitude and longitude. As a user, I could specific this, or convert a country to longitude and latitude.

So when you navigate to a users profile, check the first 5 images for the location, if there is a location that is in a range from the specified location, and the other parameters match, then you can follow them. Otherwise, ignore them and move on.

It seems a bit of work, but that would make the software more usable in my opinion.

stevenhardy-digital avatar Sep 02 '22 06:09 stevenhardy-digital

Is there a way to filter users by country? Sorry for not being clear. For example, only follow users from the UK or Spain.

It is not possible directly, but if they have added location to thier posts then possible. PS; You can get users by location.

Thank you @kingbotss

On research, it looks like you can match users if they have a location on their images. The media endpoint returns latitude and longitude. As a user, I could specific this, or convert a country to longitude and latitude.

So when you navigate to a users profile, check the first 5 images for the location, if there is a location that is in a range from the specified location, and the other parameters match, then you can follow them. Otherwise, ignore them and move on.

It seems a bit of work, but that would make the software more usable in my opinion.

In my opinion It is worth. But not fit for more users.

kingbotss avatar Sep 02 '22 06:09 kingbotss

@kingbotss No worries, lets see what the developer says here. If I was a react developer, I would have given it a go (i think thats what its built in)

stevenhardy-digital avatar Sep 02 '22 07:09 stevenhardy-digital

The actual bot is not written in react, but js/puppeteer. Pr welcome! See instauto project

mifi avatar Sep 02 '22 09:09 mifi

@stevenhardy-digital @mifi You can add functionality, but I am afraid you can't visit more than 200+ profiles per day. Also It would take time to collect information and if collected usernames list not from your targeted country it is waste of time. This is my opinion.

PS: You can achieve with multiple accounts + use API

kingbotss avatar Sep 02 '22 09:09 kingbotss