Giter VIP home page Giter VIP logo

node-oembed's People

Contributors

astro avatar focusaurus avatar simong avatar tuxpiper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

node-oembed's Issues

Query string params don't persist

If the url is https://youtu.be/0JUN9aDxVmI?t=32s, the response from node-oembed is

{"width":612,"author_url":"https://www.youtube.com/user/Harvard","title":"Advanced Algorithms (COMPSCI 224), Lecture 1","html":"<iframe width=\"612\" height=\"344\" src=\"https://www.youtube.com/embed/0JUN9aDxVmI?feature=oembed\" frameborder=\"0\" allowfullscreen></iframe>","thumbnail_width":480,"version":"1.0","type":"video","thumbnail_url":"https://i.ytimg.com/vi/0JUN9aDxVmI/hqdefault.jpg","thumbnail_height":360,"height":344,"provider_name":"YouTube","author_name":"Harvard University","provider_url":"https://www.youtube.com/","original_url":"https://youtu.be/0JUN9aDxVmI?t=32s"}

But directly from youtube (https://www.youtube.com/oembed?url=https%3A%2F%2Fyoutu.be%2F0JUN9aDxVmI%3Ft%3D32s), it's

{"thumbnail_url":"https:\/\/i.ytimg.com\/vi\/0JUN9aDxVmI\/hqdefault.jpg","provider_url":"https:\/\/www.youtube.com\/","thumbnail_height":360,"type":"video","version":"1.0","author_url":"https:\/\/www.youtube.com\/user\/Harvard","author_name":"Harvard University","thumbnail_width":480,"width":480,"title":"Advanced Algorithms (COMPSCI 224), Lecture 1","provider_name":"YouTube","height":270,"html":"\u003ciframe width=\"480\" height=\"270\" src=\"https:\/\/www.youtube.com\/embed\/0JUN9aDxVmI?start=32\u0026feature=oembed\" frameborder=\"0\" allowfullscreen\u003e\u003c\/iframe\u003e"}

Note you the iframe does not handle the 32s from node-oembed, but does from youtube.

Any way to use this client side?

It looks like the oembed providers require CORS to request info which means modules like this one can only be used server side.

Is this true?

please publish new version out to npm?

PR #5 is a required change now for node 6.x and later since util.pump went from deprecated to gone, but the last published version in the npm registry is from before that fix. Could you please publish a new version out to npm? I'll point to this repo in the mean time but I'm sure others are hitting this issue as well. ๐Ÿ˜„

Crash

I had a crash when I tried to fetch the following URL: http://www.tatw.co.uk/podcast.xml
I also use embed.ly.

Stack trace
/Users/pronebird/dev/homejs/node_modules/oembed/lib/oembed.js:115
attrs.rel === 'alternate' &&
^
TypeError: Cannot read property 'rel' of undefined
at Object.DiscoveryHandler.writeTag (/Users/pronebird/dev/homejs/node_modules/oembed/lib/oembed.js:115:11)
at Parser$writeHandler as writeHandler
at Parser$parseTags as parseTags
at Parser$parseChunk as parseChunk
at Discovery.write (/Users/pronebird/dev/homejs/node_modules/oembed/lib/oembed.js:78:17)
at IncomingMessage.exports.pump (util.js:496:21)
at IncomingMessage.EventEmitter.emit (events.js:126:20)
at IncomingMessage._emitData (http.js:359:10)
at HTTPParser.parserOnBody as onBody
at Socket.socketOnData as ondata
16 Nov 23:22:59 - [nodemon] app crashed - waiting for file changes before starting...

node-oembed hangs

Is there a way to set a time-out in node-oembed? When calling some URLs they just hang forever.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.