ZacharyTalis / AltTextBot

A Discord bot designed to reduce the message clutter associated with image alt-text. Also includes leaderboard functionality for alt-text submitters!
https://zacharytalis.com/blog/atb
Apache License 2.0
2 stars 0 forks source link

Automatically pull og:image:alt content from embedded links #19

Open ZacharyTalis opened 3 years ago

ZacharyTalis commented 3 years ago

Feature request: When a user posts a link, visit the link to see if the webpage contains a meta tag with property="og:image:alt". If so, fetch and automatically post the content of this tag to the server.

Example: Image link - https://mastodon.opportunis.me/@Grandasse_/106419305487796570 Head element -

<meta content="anakin padme meme :
– I've added subtitles to make my content accessible
– But not automatically generated ones, right ?
– ...
– but not or tomato call he gem her eight it ones, write ?" property="og:image:alt">

Consideration: Depending on how the text-fetching functions, the fetch may contain escape characters (such as \n). If so, pretty up that dirty text like a good little bot.