Giter Site home page Giter Site logo

itteco / iframely Goto Github PK

View Code? Open in Web Editor NEW
1.5K 50.0 283.0 11.31 MB

oEmbed proxy. Supports over 1800 domains via custom parsers, oEmbed, Twitter Cards and Open Graph

Home Page: https://iframely.com

License: Other

JavaScript 95.91% Shell 0.01% Dockerfile 0.06% Makefile 0.16% Jinja 1.08% EJS 2.78%
embeds oembed twitter-cards open-graph responsive

iframely's Introduction

Iframely API for Responsive Web Embeds and URL Meta

This is the self-hosted version of Iframely's APIs and HTML parsers.

Iframely takes your URL and returns its metadata. If supported on the URL, we'll add HTML of rich media embeds. Think layers, posts, slideshows, surveys, infographics, maps and more.

This package includes specific domain parsers for most popular publishers. YouTube, Facebook, Instagram, Twitter, SoundCloud, Google Maps, TED, Twitch and many more. See /plugins/domains folder. In addition, we cover many domains by whitelisting media through the generic publishing protocols: oEmbed, Open Graph, Twitter Cards and microformats. For the rest of URLs, you'll include have metadata and thumbnail images from those protocols. Use it to create your own URL previews.

Iframely's whitelist file is fetched from our central database. The changes are synced automatically to your instance by default. But you replace that with your own whitelist file. There should be over 1500 domains covered by the central whitelist.

Breaking changes in version 2.0.0

The minimum version of the Node required for Iframely starting from version 2.0.0 is Node 14. Please see migration steps from earlier versions.

API endpoints

To make use of the data, you need to connect to APIs over HTTP. There are two endpoints available. One in oEmbed and one in Iframely API format. The oEmbed endpoint is just an adapter from Iframely to oEmbed spec.

Iframely format mimics the <head> section of the page. It has meta field for data and links array for media.

Both endpoints accept &url= input and provide JSON response. Below are some open responses from our cloud API, so you can see the format:

You can use Iframely can as Node.js library. That's how we use it in the cloud. However, documentation on it is lacking.

Not included as compared to Cloud API

Hosted cloud APIs can optionally return Iframely.com-powered iFrame renders in the html field. iFrames deliver all hosted widgets such as cards for URL previews, GIF support, player events, AMP, and others. Our per-URL customization, predictive sizing mechanism for JavaScript-based embeds to minimize the layout shift, lazy-loading, type-based media whitelist and the number of other configurations are only available in the cloud.

This open-source version provides the web parsers only. Iframely cloud use data from those parsers as-is in production. Though the format of API endpoints between the cloud and self-hosted version should match, there might be minor discrepancies.

Finally, there's a number of domain plugins not included in self-hosted version. We seem to have stopped adding new publishers to the open-source. It looks like many of our later providers need quicker turnaround time for updates and fixes. You can extend the self-hosted version with private plugins too.

Get started:

To get started with the APIs:

Contribute

We put our best effort to maintain Iframely and all its domain parsers. Please, feel free to reach us on Twitter or to submit an issue if you have any suggestions. Our support email is support at iframely.com

Fork and pull-request, if you'd like to add more plugins and/or contribute fixes or improvements. By doing so, you make your work available under the same MIT license.

Please submit your PR against develop branch. This is where everything gets merged before we release it into master.

License & Authors

MIT License. (c) 2012-2022 Itteco Software Corp. Nazar Leush, Ivan Paramonau and the contributors.

iframely's People

Contributors

aariacarterweir avatar ajwild avatar asap avatar dependabot[bot] avatar eabehr avatar elenakastritsa avatar fent avatar freelook avatar garmoncheg avatar gromnan avatar iparamonau avatar itarcontact avatar j0k3r avatar jangarcia avatar joltcan avatar js1010111 avatar justjosias avatar leereilly avatar marwonline avatar morantron avatar nleush avatar normandohall avatar panzi avatar siniakinaa avatar sreuter-atl avatar suprememoocow avatar torbenbrodt avatar trevorah avatar victorenator avatar yellowby 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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iframely's Issues

Does iframely use readability js ?

I was asking myself how you parse html from sources . Just check the code and didn't find readability js how is the must have for this project.

type for image sites

Hi,
Can we get the type for image sites like flickr, instagram, pinterest,
to show the media type like photo/video instead of type as rich
and get the thumbnail url?

Youtube Error 429

Hi,
I started getting Error code 429 while getting data for any Youtube video. Can somebody please help urgently?

Youtube embeds are failing

Hi,

The youtube embeds are failing in the open source code if the pm2 service is ran on clustered mode for our aws server with 4 cores. It returns back the youtube error 429. The command used for pm2 is:
sudo pm2 start server.js --name "iframely" -i 0
If i run without -i 0, it works fine.

P.S. The service does not fail in the clustered and other embeds also don't fail.

Regards,
Manik Mittal

div tag with html

Hi,
It is not an issue, just a question. Is there a way to get the html with the div tag for video/rich embeds. Like for youtube embeds. I get html as

"<div style="left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 75.0019%;"><iframe src="https://www.youtube.com/embed/uyV1fsIGJKo?rel=0&amp;showinfo=1\" frameborder="0" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" style="top: 0px; left: 0px; width: 100%; height: 100%; position: absolute;"></iframe>"

I want only the iframe/video tag.

Regards,
Manik Mittal

Providing unique identifier of the content relative to a site

User story: As API user, I want to get unique ID of the content relative to a site.

Examples
https://www.youtube.com/watch?v=XOmwZopzcTA&index=9&list=PL53194065BA276ACA
ID: XOmwZopzcTA

https://soundcloud.com/jackedradio/afrojack-presents-jacked-radio-week-23
ID: 210140747

For a site where it's not possible to recognize system ID it would be based on a value from URL:
https://soundcloud.com/jackedradio/afrojack-presents-jacked-radio-week-23
ID: jackedradio/afrojack-presents-jacked-radio-week-23

What do you think?

Some of the youtube videos are not working

Hi,

Is there some reason, some of the youtube video embeds (~5%) are not working. Like for this url:
https://www.youtube.com/watch?v=TjUX3CeRUZI and
https://www.youtube.com/watch?v=nevGBkrQnCA
if I see the open source code version on my server, it shows up result for iframely as:

{
"type": "video",
"version": "1.0",
"title": "Sleepsong by Secret Garden (with lyrics)",
"author": "myraadrian",
"provider_name": "YouTube",
"description": "My gratefulness and respect to all the artists on the Internet. In Irish the word for a lullaby is SUANTRAI sleepsong a beautiful and simple way of describing what the song is meant to do sing someone to sleep. The words are written by Brendan Graham. The Irish singer is Saoirse.",
"url": "https://www.youtube.com/watch?v=TjUX3CeRUZI",
"provider_url": "https://www.youtube.com"
}

But, this is working on iframely api access (http://iframe.ly/71Flhb.oembed). Is there some difference in the code?

Regards,
Manik Mittal

Box.com oembed

Hi!

A couple of days ago all links from app.box.com stopped being rich, but started to recognise as plain links when requesting them from /oembed. Can you please shed some light what the cause could be and if there is any way to fix this?

rel value for more general widgets

We at crowdranking.com provide iframe based ranking widgets. These don't really fall in any of the categories (favicon, thumnail, image, player, reader, logo). So I think there should be a general widget or embed rel value. widget is already in use for autodiscovery for W3C widgets, but embed seems to be unused, see the existing rel values.

Here are two example usages of ranking widgets:
http://bloodyalbatross.tumblr.com/post/30356388187/here-i-ranked-the-imho-best-video-game
http://panzi.github.io/Browser-Ponies/ (scroll down)

PS: Currently we don't provide much metadata, but when I've time I will implement an oembed endpoint and reference it in the head of ranking pages.

Flickr content is being returned as of type rich only

Hi,

Sorry, If I am too repetitive.
I want to extract data for flickr as type photo or video. Is there some way?
I have tried removing the apiKey and it started showing the way I want.
Do you see any issues in using filckr embeds without key? Also, is there some way the flickr embeds could be done with key and get the types as photo and video?

Regards,
Manik Mittal

Amazon.com

Hi,
The Iframely is not working for Amazon.com. Is there anyway to get it?

Regards,
Manik Mittal

Caching fails on jsonp requests

Upgrading an older install of iframely, I noticed that caching was no longer working for jsonp requests. Haven't looked into the code yet, but checking keys in Redis, I see keys like these:

urlcache:0.5.7:/oembed?callback=jQuery11020026020831894129515_1424903544378&url=http%3A%2F%2Fwww.slideshare.net%2Fcmcnulty2000%2Flavacon-session-proposal-triple-tag-managed-metadata-and-taxonomies-for-content-management&_=1424903544379

which includes the jquery callback function which can obviously change with each request. Should caching be rather done with a key like this?

urlcache:0.5.7:oembed:http%3A%2F%2Fwww.slideshare.net%2Fcmcnulty2000%2Flavacon-session-proposal-triple-tag-managed-metadata-and-taxonomies-for-content-management

Manually build an embed from datawrapper.de

I added datawrapper.de to our internal fork of Iframely few days ago but I don't think I did it in the best way...

For the background, datawrapper is an open source tool to create chart from a source. Once you've finished polishing your chart, you can only grab the embed code where the embed url look like this: http://cf.datawrapper.de/zjCKi/2/

When I wanted to integrate it into Iframely, I noticed this line in the HTML source:

<link rel="alternate" type="application/json+oembed" href="https://datawrapper.de/api/plugin/oembed?url=http%3A%2F%2Fcf.datawrapper.de%2FzjCKi%2F2%2F&amp;format=json" title="Montant total des amendes infligées par les régulateurs américains" />

Which was perfect for Iframely! Sadly, it leads to a 404 ...
I reached datawrapper support and they replyied:

There is a module allowing for oEmbed, but it is like half-baked right now. If possible we would like to postpone work on this, there are more urgent tasks

😢

So I started digging in the plugin creation to handle it on my own.
I created a file plugins/domains/datawrapper.de.js :

module.exports = {
    re: [
        /^http[s]?:\/\/cf.datawrapper.de\/(.+?)(?:[\/](?:index\.html)?)?$/
    ],

    mixins: [
        "html-title"
    ],

    getLink: function(urlMatch, meta) {
        return {
            title: meta['html-title'],
            type: CONFIG.T.text_html,
            rel: CONFIG.R.inline,
            // href: "http://cf.datawrapper.de/" + urlMatch[1] + "/",
            html: '<iframe width="566" height="400" scrolling="no" frameborder="0" src="http://cf.datawrapper.de/' + urlMatch[1] + '/"></iframe>'
        }
    },

    getMeta: function(meta) {
        return {
            site: 'datawrapper',
        };
    },

    tests: [
        "http://cf.datawrapper.de/zjCKi/2/",
        "http://cf.datawrapper.de/Gx44C/21/",
        "http://cf.datawrapper.de/RrO5t/2/"
    ]
};

What I don't like in this snippet, is the way I manually built the iframe instead of letting Iframely to its job and wrapping it in a div, etc ..

How can I do that?

Coub player doe not autostart with autoplay=1 (iframely API)

Per https://iframely.com/docs/parameters, one can use autoplay=1 to make player start.
But for Coub this doesn't work
Example:
http://open.iframe.ly/api/iframely?url=https://coub.com/view/59wl5&api_key=XXXXXX&autoplay=1
– this call returns:

...
    "html": "<div style=\"left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 56.2493%;\"><iframe src=\"//cdn.iframe.ly/api/iframe?url=https%3A%2F%2Fcoub.com%2Fview%2F59wl5&amp;key=e73a91afeaa8747c3d0b69f4ec3baff6&amp;autoplay=true\" frameborder=\"0\" allowfullscreen=\"true\" webkitallowfullscreen=\"true\" mozallowfullscreen=\"true\" style=\"top: 0px; left: 0px; width: 100%; height: 100%; position: absolute;\"></iframe></div>"
}

And this HTML shows non-autostarted player.

BTW, Coub.com itself provides option autostart=1 (not autoplay).

Script tags in Meteor doesnt work

When using the iframely:oembed package for meteor, if the resulting html contains a script tag the embed doesn't show up. Anyway around this?

Cache Error Response Codes too

At the moment, if we got 404, 401, 302 or 301 or other errors for an URL, we don't keep these results. The next time we get the request to the same URL, we'll try it all over again, creating unnecessary load to the server.

I trust we should save these. Except perhaps 5XX result codes which might be temporary (we could cache them for shorter period though, like 15 mins).

GoogleMaps: need better view to span and zoom convertion

Someone who knows about longitude/latitude calculations could convert the long+lat+view diameter (I think in meters) of the new Google maps into long+lat+span in degrees of the embed code and long+lat+zoom for the given resolution of the thumbnail. I don't feel like learning this kind of math so I just did a quick conversion of the diameter to a zoom value (the embeds accept long+lat+spn or long+lat+zoom). However, the zoom value is probably only correct under a certain window/iframe size (it is correct for me for maximized browser windows; my screen resolution is 1920x1080). So the embed shows the correct coordinates, but they only show the correct area if the original URL already had a spn query parameter. The way I did it the thumbnail will probably never show the exactly correct area, because it needs a zoom value (doesn't accept spn). I would need to convert the spn to a zoom for the given width/height. If the original URL has no zoom (only a spn) the thumb currently has zoom=0 (completely zoomed out). You get such URLs if you go to a new Google Maps URL but you don't have opted in to the new Google Maps GUI.

So if someone who knows this sort of maths would take a look at it, the generated embed code and thumbnails could be much better (show precisely what the user viewed in Google Maps before).

Support for latest Google Maps URLs

I'm trying to convert from a Google Maps share link (which is the same as the URL in the browser's address bar) to the code for an iframe to embed it and also do the reverse so that if a user pastes the iframe embed code I can work out a URL to that resource.

I'm interested in the latest/newest version of Google Maps. Not classic, and not the preview one from a while back with the hash (#) based links.

I see pasting the URL and getting working iframe code out works on your website:
http://iframely.com/debug?uri=https%3A%2F%2Fwww.google.com%2Fmaps%2Fplace%2F80%2BHout%2BSt%2F%40-33.92071%2C18.4193399%2C17z%2Fdata%3D!3m1!4b1!4m2!3m1!1s0x1dcc67668fbe5563%3A0xd8582b636029974d

But the code in your repository only covers that previous/interim hash link based URLs:
https://github.com/itteco/iframely/blob/173514a22dc9b90c260cbdae664b62b7fcf0d7c4/plugins/domains/maps.google.com.js

Am I looking at the wrong thing, or is your Google Maps plugin not open source?

autoresize iframes spec

This is actually something you (iframely) cannot provide, but that has to be implemented by the embed service and the embed user. But I think someone should specify a way how such a thing can be done. Maybe this isn't the proper place for this, but where would that be? Anyway, I would propose this interface:

The embed sends a message like this on load:

parent.postMessage("iframely:style:width=320px&height=480px&overflow=hidden&border=0%20none%20transparent&background=transparent","*");

iframely:style: is a marker so that the site using the embed understands what to do with this message. The rest is encoded as a URL query string. A string is used instead of a JavaScript object because older browsers only support strings as message data.

Note: The site parsing the message has to filter the style properties (only allow certain ones), so that the embed cannot do any shenanigans. Just allowing the ones used here should be ok. (Things like opacity and absolute/fixed position are not ok.)

Also for older IEs overflow and border have to be translated into scrolling and frameBorder. However, dynamically setting frameBorder="0" seems not to work in IE8, so it has to be done by the embed user anyway. The important things are width and height. Maybe only width, height, overflow and background should be supported?

Who needs this?

Embeds that should integrate more or less seamlessly into the parent page. E.g. Disqus, but also crowdranking when the user want's to use "auto-size" (so that the embedded ranking does not need scroll-bars). There was another service of which I forgot the name/URL. There you can host hole articles with images and what not. These also auto resize to their content.

Currently all these services use their own APIs that require the embed user to include scripts provided by the services, which I deem ugly and unsafe. If the message format for these tasks would be standardized this would not be necessary.

Browser Support

postMessage has to be supported: http://caniuse.com/#search=postMessage

Internet Explorer 8+ (witch the mentioned limitation on frameBorder for IE8), Firefox 3.0+, Chrome 4.0+, Safari 4.0+, Opera 9.5+ etc.

There are hacks for old browsers that do not support postMessage, but they are extremely hackish and produce problems when the page has more than one embed. The hacks work like this: Communicate to the iframe the exact URL of the parent page, so that the iframe can then do:

parent.location = known_parent_url+"#!iframely:style:"+style_query;

And the parent frame has to poll location.hash with setTimeout (because browsers that do not support postMessage don't support onhashchange either). If two embeds set the parent's hash within the same poll interval one message is lost. Also there is no easy way to know which embed sent the message. Also pages that actually use location.hash for their own purposes will have problems with this. So I wouldn't bother with this hack.

Example

http://jsfiddle.net/fF9Hp/6/ (iframe)
http://jsfiddle.net/nxUVp/10/ (embed user)

Support for SSL

Hi,

This is a question.I want to know, if the site provides both http:// and https:// url's, then can we get the protocol relative url's, using the open source project?

Regards,
Manik Mittal

crash because link.href is object, not a string

When trying to load this URL:
http://channel9.msdn.com/coding4fun/articles/MissionControl-A-Flexible-API-for-Remote-Device-Control

link.href is an object in this line, but a string is expected:
https://github.com/itteco/iframely/blob/develop/lib/iframely.js#L344

I don't know where link.href is constructed, so I couldn't provide you with a patch.

Also I noticed this line should probably be removed:
https://github.com/itteco/iframely/blob/develop/lib/iframely.js#L346

It misses the group that is referenced in the replacement pattern and if you would add the group it would do the same as (or a subset of) the next line.

Documents are missing?

Links in the get started section are almost all unavailable now. Seems this was happened just in 1~2 days. I remember that I checked the document about self hosting on the website recently.

NODE_ENV=development and config.local.js

I ask you to make changes to the documentation. (https://iframely.com/docs/host).

I have a NODE_ENV==='development' and when i created config.local.js file, this does not work. Then when i created file config.development.js - it's work!

I think it's not obvious.

I think you should specify that the name of the config file depends on the environment (NODE_ENV).

P.S. Sorry about my english.

JavaScript API

I'd like to integrate iframely into my application as a module. My application is not express based however. Does iframely expose a public JavaScript API that I can use?

I may be missing something, so my apologies if this is a stupid question...

PM2 i 0 stopped working

Hi,

I am using iframely source code for quite some time and it is very helpful. Last, I took the version 0.8.10 and after that I started getting issues with PM2 -i 0.

If I now run command as PM2 start server.js -i 0, it is getting stuck, anything changed.

Regards,
Manik Mittal

Error in node v0.12.0 (TypeError: Cannot assign to read only property 'string' of (begin))

I have a problem.

The current node version on my computer is: v0.12.0

When I run the command node server the console displays:

Using cache engine: node-cache
No local whitelist file detected...
Loading whitelist from http://iframely.com/qa/whitelist.json
evalmachine.<anonymous>:2557
        s.string = s;
                 ^
TypeError: Cannot assign to read only property 'string' of (begin)
    at ultimate (evalmachine.<anonymous>:2557:18)
    at evalmachine.<anonymous>:3167:5
    at evalmachine.<anonymous>:6399:2
    at Object.exports.runInContext (vm.js:64:17)
    at Object.<anonymous> (/Users/kulakowka/Documents/node.js/iframely_for_geekhub/node_modules/jslint/lib/nodelint.js:9:4)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)

When I run the command npm test the console displays:

> [email protected] test /Users/kulakowka/Documents/node.js/iframely_for_geekhub
> vows test/main.js --isolate --spec

evalmachine.<anonymous>:2557
        s.string = s;
                 ^
TypeError: Cannot assign to read only property 'string' of (begin)
    at ultimate (evalmachine.<anonymous>:2557:18)
    at evalmachine.<anonymous>:3167:5
    at evalmachine.<anonymous>:6399:2
    at Object.exports.runInContext (vm.js:64:17)
    at Object.<anonymous> (/Users/kulakowka/Documents/node.js/iframely_for_geekhub/node_modules/jslint/lib/nodelint.js:9:4)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:365:17)
util.print: Use console.log instead

✗ Errored » 1 errored (0.000s)

npm ERR! Test failed.  See above for more details.

When I switched to node version v0.10.36, and then run command node server, Iframely worked.

I think the fault node version?

How to make iframely work with the latest version of the node?

Right way to test plugins?

Hi!

I'm trying to a create a new plugin and failing with running current test suite. Looks like there are 2 different commands for that:

  • npm test (runs less than 10 tests)
  • ./test-plugins.sh (fails because of CONFIG.tests settings not specified. I've tried to provide them, but then scripts hangs doing nothing)

Sorry if I missed some docs, but what is the right way to run the tests now?

Non-visual version of Soundcloud embed

There are two versions of the embed from sound cloud. One is &visual=true, which has the artwork cover the background.

The other is the normal, non-visual one, that has the artwork on the far left.

iFramely shows the visual one, but I can't see in the source code where it requests that or how to change it.

Issue with nytimes articles

Hi,
I am trying to oembed the nytimes articles If i run it on iframely.com/embed it brings back the correct thumbnail image.
But if I take the iframely github repository code and deploy it to my environment, the thumbnail image that I get is the small image using the oembed.

Result from my local
{
"type": "link",
"version": "1.0",
"title": "After He Beat Floyd Mayweather Jr., They Said, O.K., Now Do It Again",
"author": "John Branch",
"author_url": "http://topics.nytimes.com/top/reference/timestopics/people/b/john_branch/index.html",
"description": "When Augie Sanchez, now a top boxing trainer, beat Mayweather in the 1996 Olympic trials, the format was unusual in that it was merely the start of a best-of-three process.",
"thumbnail_url": "http://static01.nyt.com/images/2015/04/26/sports/26SANCHEZweb1/26SANCHEZweb1-thumbStandard.jpg",
"favicon": "http://static01.nyt.com/images/icons/ios-ipad-144x144.png",
"url": "http://www.nytimes.com/2015/04/26/sports/after-he-beat-floyd-mayweather-jr-they-said-ok-now-do-it-again.html"
}

Result from Iframely
{
"id": "yRtHYy",
"url": "http://www.nytimes.com/2015/04/26/sports/after-he-beat-floyd-mayweather-jr-they-said-ok-now-do-it-again.html",
"type": "rich",
"version": "1.0",
"title": "After He Beat Floyd Mayweather Jr., They Said, O.K., Now Do It Again",
"author": "John Branch",
"author_url": "http://topics.nytimes.com/top/reference/timestopics/people/b/john_branch/index.html",
"provider_name": "@nytimes",
"thumbnail_url": "http://static01.nyt.com/images/2015/04/26/sports/26SANCHEZweb1/26SANCHEZweb1-facebookJumbo.jpg",
"thumbnail_width": 1050,
"thumbnail_height": 550,
"html": "<div style="max-width: 2100px;"><div style="left: 0px; width: 100%; height: 0px; position: relative; padding-bottom: 52.381%;"><iframe src="//cdn.iframe.ly/yRtHYy?summary=true" frameborder="0" allowfullscreen="true" webkitallowfullscreen="true" mozallowfullscreen="true" style="top: 0px; left: 0px; width: 100%; height: 100%; position: absolute;"></iframe>"
}

Is there some thing I am doing wrong and can do to configure Iframely code?

FB Video Embed

Hi,

Is there a way to get the thumbnail for the FB Video?

Regards,
Manik Mittal

Some pages can't be parsed

For example this page makes problems:
http://pinterest.com/pin/315885361334150660/

On http://iframely.com/debug I get 403. Locally the page loads but then the SAX parser fails. It gets confused by the messy HTML and skips all the important meta tags. Strangely I can't reproduce this in a minimal setup, but I can when using iframely. I'm pretty sure it's the SAX parser after debugging and adding appropriate log statements in iframely-meta.js.

So maybe another HTML parser would be better? Maybe node-htmlparser2? They claim to be a lot faster than SAX, too. However, they don't resolve entities. But that is easily done with entities.

Should I port parsing of meta tags to node-htmlparser2? Maybe I'll do that even if it's just to find out whether it's really SAX who messes up.

Btw. when using $selector on valid HTML that is not well-formed XML you also get errors. E.g. <p> tags don't need </p> in HTML. Any further <p> automatically closes the last one. With $selector they are all nested, though. Yes, this is ugly and I don't write such HTML, but some people do.

Supporting Different Countries

Hi,

while most domains like facebook, youtube etc. automatically redirect to the ".com" domain, other web pages e.g. amazon have their "regional" domains e.g. ".co.uk" / ".es" etc.

Having just started to play around with custom plugins...
any way of allowing country specific matching (single file) opposed to writing multiple files per domain / region each ?!

Thanks for your help.
Some coding input would also be fine.

Thx.

Timeout / redirect loop for a vk.com page

For request http://iframe.ly/api/iframely?url=http://vk.com/photo-27744747_376634226&api_key=XXX the following is returned:

{
    "status": 408,
    "error": "Requested page error: timeout"
}

I also tried it on my own installation of iframely and see (for http://HOSTNAME/iframely?url=http://vk.com/photo-27744747_376634226):

Requested page error: timeout

More interesting, if we add autoplay= GET param (http://HOSTNAME/iframely?url=http://vk.com/photo-27744747_376634226&autoplay=1) we got this error after some time of waiting:

Requested page error: redirect loop

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.