jacktuck / unfurl

Metadata scraper with support for oEmbed, Twitter Cards and Open Graph Protocol for Node.js :zap:
MIT License
475 stars 51 forks source link

Youtube OEmbeds fail, entities in URL not decoded #45

Closed trieloff closed 4 years ago

trieloff commented 4 years ago

Trying to embed https://www.youtube.com/watch?v=TTCVn4EByfI fails, as the getRemoteMetadata step fails to retrieve http://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DccYpEv4APec. The correct URL is of course http://www.youtube.com/oembed?format=json&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DccYpEv4APec, so this issue can be resolved by parsing entities in the provided URL. I will open a PR shortly.