discord / discord-api-docs

Official Discord API Documentation
https://discord.com/developers/docs/intro
Other
5.91k stars 1.25k forks source link

Discord URL meta crawling over accessing #521

Closed xron89 closed 6 years ago

xron89 commented 6 years ago

Maybe this is in the developer documentation, I certianly couldn't find it in which case aplogies in advance.

I'm having issues understanding how when I paste urls in this instance my own website how discord is retriveing page data not outlined within meta tags. You produce this well crafted rich data card as do most applications now, however I'm seeing instances where the application is showing information that isn't defined in the page source meat description.

Does discord spider the site map looking for relavent key tags e.g. page/post author? Is there a cache on discord when posting the same site url, or domain?

Quite possibly there could be a bug with the retrival of page data?

ghost commented 6 years ago

Open Graph is what Discord uses.

http://ogp.me/

xron89 commented 6 years ago

I assumed as much, but I can't get any other social platform, or application to retrieve anything like the rich data card Discord retrieves. For some reason, discord isn't happy with page URL, title, and description it retrieves additional information no other platform does, data that isn't within the page source.

Thanks for confirming I will check open graph, still seems like a bit of an odd overreach on discords behalf.

ghost commented 6 years ago

Some websites have custom embeds (like youtube, imgur, etc.), which gets done by discord.

b1naryth1ef commented 6 years ago

If you post a specific example I'd be happy to clarify where the embed data is coming from, but unless its a third party service as @CharlotteDunois mentioned we don't do any additional crawling.

xron89 commented 6 years ago

Hi thanks for getting back to me, no third party services are being used. As a random example then when I paste this link - Removed

The biggest heading Discord gives it's data snippet is "admin" which is I assume an author.

The meta tags don't have an author tag, and the og:type is set to website not 'article' so to my understanding there should be a no crawl anyway to look for an author even if there was one present on the page (there isn't).

Example - https://i.imgur.com/GwOK9w1.png

night commented 6 years ago

The site is using Wordpress, which exposes an oembed API that tells us the author is admin: http://devground.zare.com/wp-json/oembed/1.0/embed?url=http%3A%2F%2Fdevground.zare.com%2F

jhgg commented 6 years ago

Hi @xron89 - looks like @night answered your question, and since we haven't heard back in a few days, going to close this issue. If you have any further questions, feel free to re-open, or ask in the #api channel @ https://discord.gg/discord-api

chriskolenko commented 6 years ago

Found this link here:

https://www.reddit.com/r/discordapp/comments/82p8i6/a_basic_tutorial_on_how_to_get_the_most_out_of/

I can't figure out how to get the footer or fields working with any type of meta tags. Any ideas?

thomashigginbotham commented 5 years ago

Here are some instructions for disabling oEmbed with WordPress (in case anyone else doesn't want their author names appearing in Discord): https://www.isitwp.com/remove-everything-oembed/