SourceBot

SourceBot

@sourcebot.excessive.space

https://excessive.space

4 followers5 following33 posts

Pinned

Hi! I am a bot. Well, more of a bot project. Initially I will be used by SourceBot (a Discord image-sourcing bot) to find images and show them in their best quality to users, but eventually I will be able to syndicate BlueSky messages onto Discord as they come out! excessive.space

Not many posts on this account. Let's fix that! SourceBot has been trundling along for a while now with nothing new added. That's cool, I don't charge for it anymore. But with Derpibooru being a little wobbly of late, I wanted another good reverse searching service to take up the slack.

View full thread

SourceBot now just makes a call to this, giving it the URL. Cloudflare handles the image resize/sending, then passes back a list of URLs that have the image. Success never tasted so good. Huge thanks to @fluffle.xyz again. Great service, send love to them!

Not many posts on this account. Let's fix that! SourceBot has been trundling along for a while now with nothing new added. That's cool, I don't charge for it anymore. But with Derpibooru being a little wobbly of late, I wanted another good reverse searching service to take up the slack.

View full thread

1 is easy. Cloudflare has a nice little js.fetch() function that can easily gobble a URL and spit out image blob. 2 was actually integrated into 1. Cloudflare allows you to resize images as you ingest them. Very nice! 3 ...

3 is where the rub lies. Fluffle wants a specific user agent layout, Cloudflare doesn't want to allow me to use such a user agent via any of the usual Python utils (httpx, aiohttp, etc), and the requirement for uploading a blob of data means js.fetch() (in Python) doesn't work. What do?

Not many posts on this account. Let's fix that! SourceBot has been trundling along for a while now with nothing new added. That's cool, I don't charge for it anymore. But with Derpibooru being a little wobbly of late, I wanted another good reverse searching service to take up the slack.

Enter @fluffle.xyz (oooh, they have a Bluesky!). Great little reverse searching service, and they have an API. Very nice. A small downside is that SourceBot only works with URLs, not blobs of image data. Now, I could do some really horrible bodge-coded solution to do it in SourceBot, but...

Let's leverage @cloudflare.social! So, to make an API endpoint to take an image URL and spit back site URLs, I need to do 3 things: 1. I need to download the image 2. I need to ensure it is smol (Fluffle only likes 4MB or less) 3. I need to do the Fluffle query

View full thread

Scams suck. If you're a dev on a chat platform, and you're seeing a pile of them, I can recommend a little project! Get yourself some free time on a service (Cloudflare workers will do). Find a pHashing library for your language of choice.

View full thread

Scams suck. If you're a dev on a chat platform, and you're seeing a pile of them, I can recommend a little project! Get yourself some free time on a service (Cloudflare workers will do). Find a pHashing library for your language of choice.

Scan all images and compare hashes to a list of known scam images. Use Hamming distance of around 4 or so to survive JPG compression. Warn/ban/mute/whatever folks who post those images.

Whew. Huge thanks to The AT Protocol SDK Python team with some questions to implement this, but now SauceBot can detect if a post is NSFW (and will hide the image in Discord if so), can put proper links for hashtags, URLs, and user links. Oh, and can also show embeded URLs as if they were an image.

So, here I am, trying to test my Bluesky->Discord bot's label handling, and all I can find is things tagged porn. Okay, great to see it handles that fine, but I need to test all the tags. So, could I ask that Bluesky mods ***not*** change the tags of any of the replies to this post? KKTHX.

View full thread

DeviantArt. Always such a weird place to interact at the best of times, has an odd feature. "Only show image to followers" is a toggle an uploader can set that is so strange in its use-cases. Anyway, my subscription engine now works around this. Congrats everyone, you have a new watcher!

You are up to date.