tweetcord icon indicating copy to clipboard operation
tweetcord copied to clipboard

NSFW content isn't filterable

Open aetheryx opened this issue 6 years ago • 14 comments

For some reason, Twitter isn't telling me when tweets are NSFW. The possibly_sensitive is ALWAYS false on streams.
Example payload (watered down): https://hastebin.com/tijirinigu.js

Image embeds are disabled until further notice: https://github.com/Aetheryx/tweetcord/commit/86353406bd6d6eb045da83162fee9720a55d17ee

aetheryx avatar Mar 14 '18 20:03 aetheryx

https://twittercommunity.com/t/how-to-filter-nsfw-nude-images-using-twitter-api/62423 It only goes true when the tweet contains a video/image

LevitatingBusinessMan avatar Mar 14 '18 20:03 LevitatingBusinessMan

The tweet does contain a video/image. Take a look at the response body in my original comment - there's a URL to the tweet in question.

aetheryx avatar Mar 14 '18 20:03 aetheryx

It might rely on AI to detect if the image is actually NSFW then (like mentioned in that thread). Anyway ye I didn't actually look at the image and that certainly is nsfw...

LevitatingBusinessMan avatar Mar 14 '18 20:03 LevitatingBusinessMan

I highly doubt this is an issue with their recognition. The tweet itself is masked if your Twitter settings specify masking NSFW content (https://why-are-you-buying-clothes-at.the-soup.store/2b6a4a.png). I suspect it's an issue with the reported value just being wrong on streams.
Twitter has issues with async processing in other parts of their API. I'm guessing that the possibly_sensitive parameter is adjusted after the image is scanned for NSFW, which could be considered a costly operation - meaning they might have chose to run image recognition after emitting the event initially.
This would also explain why the parameter is fine for querying tweets, but not on streams.

aetheryx avatar Mar 14 '18 20:03 aetheryx

Use an API to check for nudity yourself ¯_(ツ)_/¯

LevitatingBusinessMan avatar Mar 14 '18 21:03 LevitatingBusinessMan

Won't be using an API, but yeah, that's more or less the plan. Detect it on my own.

aetheryx avatar Mar 14 '18 21:03 aetheryx

Hi is there any possibility to have a parameter or command to force the image embed (case of bot available in one chanel / only admin can talk to it) ?

Kperroch avatar Jul 03 '18 19:07 Kperroch

If you make the channel an NSFW channel they will always display

MrLar avatar Jul 03 '18 19:07 MrLar

Okay but this is not an NSFW twitter channel/ if I set the channel as NSFW not everyone will see the post.

Kperroch avatar Jul 03 '18 19:07 Kperroch

This behaviour probably won't change until Aetheryx can find a viable alternative to filtering NSFW images. Reason being that if for some reason NSFW tweets do make it into a non-NSFW channel then his bot would break the terms of service and would probably get deleted as a result.

devoxin avatar Jul 03 '18 19:07 devoxin

or until twitter fixes their shit

aetheryx avatar Jul 03 '18 20:07 aetheryx

Have you planned to migrate the api call to the new one ?

Notice: We plan to sunset this API on Thursday August 16th, 2018. The Account Activity API will replace User Streams and Site Streams APIs. If you would like to migrate from the User Streams API to the Account Activity API, you should read through our migration guide. https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/api-reference/user-stream

Kperroch avatar Jul 03 '18 20:07 Kperroch

I believe that's the webhook based service. Unfortunately the API they're replacing streams with isn't free.

devoxin avatar Jul 04 '18 17:07 devoxin

It is, said API is way out of my budget (250 streams = $339/month, I need at least 800, not to mention Tweetcord's growth)

aetheryx avatar Jul 04 '18 17:07 aetheryx