oscarotero / Embed

Get info from any web service or page
MIT License
2.09k stars 310 forks source link

Fix OEmbed for X.com (Twitter) #540

Closed snapeuh closed 2 months ago

snapeuh commented 2 months ago

Hello,

I just edited two files to re-enable the OEmbed for x.com links.

Thanks for your work,

Regards,

Romain.

oscarotero commented 2 months ago

Thanks, Romain!

snapeuh commented 2 months ago

https://github.com/oscarotero/Embed/commit/b0e1c0496e3707794e96d4eef53ffffd538b850a#diff-e3ca17fe8a5d858fa29feee3afbe5c72b476f3f94855cc8671e6de59b32f80d2

You deleted some of my code in your latest commit. It's mandatory to make oEmbed works with x.com links.

oscarotero commented 2 months ago

@snapeuh Yes, There's a script to update the resources here that fetches automatically the oembed data from https://oembed.com/providers.json.

And X.com is already included (but under publish.x.com, instead of publish.twitter.com)

{
        "provider_name": "X",
        "provider_url": "http://www.x.com/",
        "endpoints": [
            {
                "schemes": [
                    "https://x.com/*",
                    "https://x.com/*/status/*",
                    "https://*.x.com/*/status/*"
                ],
                "url": "https://publish.x.com/oembed"
            }
        ]
    },