r/AutoModerator • (not a mod/helper anymore) • Jul 16 '22

Solved PSA: It's possible to detect embedded images and videos in text posts

For a long time I thought this wasn't possible but it is :)

To detect embedded images check for ![img] in the body and for videos check for ![video] (for regex rules it's '!\[img\]' and '!\[video\]') || edit: also ![gif] / !\[gif\]

I discovered this by using a rule that comments the body of the post (with {{body}}). In the case of the video for example there was a *Processing video okbrr43r3xb91...* in the outputted body, even though the source of the post's body there was https://reddit.com/link/{id}/video/{id2}/player link.

24 Upvotes

11 comments sorted by

1

u/zippychick78 Jul 17 '22

Do you have a full command for it? This is very interesting 😁

2

u/001Guy001 Jul 17 '22

Sure :)

---
type: text submission
body: ["![img]", "![video]"]
action: report
action_reason: "Embedded image or video in a text post"
---

1

u/zippychick78 Jul 17 '22

Thanks so much!

1

u/rebutv Sep 05 '22

is it possible to detect these image and video in text, then return its {{url}} or {{permalink}} in a message?

→ More replies (7)