silva96 / guessthehashtag

guess an instagram hashtag
MIT License
3 stars 0 forks source link

NSFW Content #6

Closed kauron closed 8 years ago

kauron commented 8 years ago

Instagram has a policy of no sexually explicit content, but there has appeared to me some content (I would say a 5-10% of the time). The tags seem to be unrelated to hide it from potential reports to Instagram, so there is no way to filter it tag-wise.

How could it be dealt with?

EDIT:

You may not post violent, nude, partially nude, discriminatory, unlawful, infringing, hateful, pornographic or sexually suggestive photos or other content via the Service.

silva96 commented 8 years ago

Right now we are showing a random picture out of 20 we retrieve, we can retrieve 100and get a random between 80 and 100, this way we can get the oldest of the pictures of the hashtag which probably have been filtered Thats something I planned to do,see the play() method, the api call is getting last 20.

silva96 commented 8 years ago

There is no way to get older pictures without iterating over pages (multiple requests). But, I found a safe workaround. People who spams, always put a lot of hashtags, then an easy fix is to add this second condition on the filterMedia for loop

public ArrayList<Media> filterMedia(String type) {
        ArrayList<Media> filtered = new ArrayList<>();
        for (Media m : data) {
            if (m.getType().equals(type) && m.getTags().length < 5) filtered.add(m);
        }
        return filtered;
    }

adding a pull request

silva96 commented 8 years ago

@kauron what do you think?

kauron commented 8 years ago

@silva96, that seems a good workaround