Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/itteco/iframely
Browse files Browse the repository at this point in the history
  • Loading branch information
jasoniangreen committed Jun 17, 2016
2 parents 1a5fb75 + 3e64085 commit c8b86c8
Show file tree
Hide file tree
Showing 205 changed files with 3,818 additions and 2,013 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.git
.gitignore
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:5.8

EXPOSE 8061

COPY . /iframely

WORKDIR /iframely

RUN DEPS="libkrb5-dev" \
apt-get update && \
apt-get install -q -y --no-install-recommends $DEPS && \
npm install -g forever && \
npm install && \
apt-get purge -y --auto-remove $DEPS && \
apt-get autoremove && \
apt-get clean

ENTRYPOINT ["/iframely/docker/entrypoint.sh"]
27 changes: 7 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,30 @@
# Iframely API for Responsive Web Embeds

Iframely is fast and simple HTTP API for responsive web embeds and semantic meta. The API covers well [over 1600 domains](https://iframely.com/try) through 150 custom domain plugins and generic parsers for [oEmbed](http://oembed.com/), [Open Graph](http://ogp.me/) and [Twitter Cards](https://dev.twitter.com/docs/cards), powered by Iframely's whitelist.
Iframely is fast and simple HTTP API for responsive web embeds and semantic meta. The API covers well [over 1800 domains](https://iframely.com/domains) through 200 custom domain plugins and generic parsers for [oEmbed](http://oembed.com/), [Open Graph](http://ogp.me/) and [Twitter Cards](https://dev.twitter.com/docs/cards), powered by Iframely's whitelist.

The whitelisting is manual process, and we do every-day manual regression testing to ensure integrity. [Submit your domain](https://iframely.com/qa/request), if you publish embeds.
The whitelist file is pullled from iframely.com and is updated automatically. You can also [have your own whitelist](/docs/whitelist-format) file. The whitelisting is manual process, and we do every-day manual regression testing to ensure integrity. [Submit your domain](https://iframely.com/qa/request), if you publish embeds.

HTTP API are available as [oEmbed](https://iframely.com/docs/oembed-api) or [Iframely API](https://iframely.com/docs/iframely-api) formats. To make it simple to understand, Iframely format mimics the `<head>` section of the page with its `meta` and `links` elements.

In response to `url` request, APIs returns you the embeds and meta for a requested web page. Below are samples from [hosted API](https://iframely.com), just to show you the format:
In response to `url` request, APIs returns you the embeds and meta for a requested web page. Below are data samples from [hosted API](https://iframely.com), just to show you the format:

- [>> Here’s API call for Coub video](http://iframe.ly/ACcM3Y.json)
- [>> Same one, but as oEmbed](http://iframe.ly/ACcM3Y.oembed)

Iframely can also be used as Node.js library.

Requires Node version 0.10.22 and up.

## Get started:

The simplest way to see Iframely in action is by using our [Chrome plugin](https://chrome.google.com/webstore/detail/iframely-url-previews/bbafbcjnlgfbemjemgliogmfdlkocjmi). This way you will see the embeds on your (or any really) site right away (but not on GitHub due to Content-Security-Policy, sorry).

Or, [try Iframely demo with your very own or any other Twitter feed](https://iframely.com/try). Don't forget to click on results to see the embed codes.

To get started with the APIs:

- There's a hosted version of these APIs at [iframely.com](https://iframely.com), if you'd rather rely on the cloud
- [API in Iframely format](https://iframely.com/docs/iframely-api) (`iframe=true` option is only available for hosted API)
- [How to install & configure](https://iframely.com/docs/host) your Iframely host.
- [API in Iframely format](https://iframely.com/docs/iframely-api)
- [API in oEmbed format](https://iframely.com/docs/oembed-api)
- [About Link Rels, Types and Media Queries](https://iframely.com/docs/links) in Iframely format (players, thumbnails, app, reader, survey, slideshow, etc)
- [META semantics](https://iframely.com/docs/meta) Iframely API scrapes for you.
- [How to install & configure](https://iframely.com/docs/host) your open-source host.


## Use APIs in your open-source project

We have provided specific endpoint for the use in open source projects. Read more at [oembedapi.com](http://oembedapi.com).



Expand All @@ -47,12 +39,7 @@ If you see an error in our domains whitelist (you can [debug URLs here](http://i

## License & Authors

MIT License. (c) 2012-2015 Itteco Software Corp.

Specifically:

- [Nazar Leush](https://github.com/nleush) - _the_ author
- [Ivan Paramonau](https://twitter.com/iparamonau) - coffee, donuts & inspiration
MIT License. (c) 2012-2016 Itteco Software Corp. [Nazar Leush](https://github.com/nleush), [Ivan Paramonau](https://twitter.com/iparamonau)

Please, check the [contributors list](https://github.com/itteco/iframely/graphs/contributors) to get to know awesome folks that also helped a lot.

163 changes: 41 additions & 122 deletions WHATSNEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,47 @@

This is the history of the Iframely changes. Updates that are older than one year are not shown.

Stay tuned, either by watching [Iframely on GitHub](https://github.com/itteco/iframely) or following [Iframely on Twitter](https://twitter.com/iframely).
To stay tuned and up-to-date, watch [Iframely on GitHub](https://github.com/itteco/iframely).

### 2016.06.10, Version 0.9.6

- Maintenance for many domain plugins: minor fixes and better coverage
- Added Plot.ly

### 2016.05.11, Version 0.9.5

Heads-up: `request` module dependency was upgraded. Please run `npm update` when deploying this version.

- Twitter plugin was switched to new oEmbed endpoint according to current docs
- Medium embeds were disabled as they are broken as of version's date
- NPR.org plugin supports links to section in addition to direct player links
- Minor fixes for number of other domain parsers


### 2016.04.13, Version 0.9.4

- Better responsive embeds for players with fixed bottom padding: Slideshare, NBC news, TODAY.com, NY Times
- Added support for Deezer, vbox7.com, Libération.fr, hosted CloudApps, Knightlab's juxtapose and timeline.js, NBA, Atlas charts, HuffPost elections pollster
- Better support for Brightcove's newer HTML5 players
- Minor fixes for number of other domain parsers


### 2016.02.18, Version 0.9.3

- Fix errors for Facebook videos where origin pages return sparadic HTTP code 500 ([#106](https://github.com/itteco/iframely/issues/106))
- Twitter retired 1.1 API for oEmbed from their documentation. oAuth configuration is now optional
- 500px provides HTML embeds for photos now
- Fix NHL after their site's re-design
- Minor fixes for number of other domain parsers


### 2016.01.26, Version 0.9.2

- Domains clean up & maintenance
- Added: Reddit comments, Discovery, amCharts, Buzzfeed videos, Fox Sports, NBC Sports, Aljazeera, Naver tvcast, Cinesports, thumbnails for Amazon products
- Gave better life for `rel=promo`, treat it as attachment media, if you see it



### 2015.12.15, Version 0.9.1

Expand Down Expand Up @@ -129,124 +169,3 @@ Starting from this version, the minimal Node.js version required for Iframely is
- Medium stories will now have JS embeds too
- Fix issues with caching of JSONP requests
- Number of fixes in various other plugins


### 2014.12.30, Version 0.7.2

Happy 2015! Iframely domains whitelist is now free and is delivered to every server instance. Over 1600 domains at the moment!

Other changes in this version:

- New `gifv` rel for players. Following Imgur's footsteps, it is to indicate MP4 videos that represent gifs and need to be shown as looping video.
- New `promo` rel, to indicate that embed is attached to the URL. For example, YouTube's used by domains in Twitter cards and Open Graph videos will now be returned with a lot more options and with rel `promo`.
- The same `promo` approach covers all Brightcove's players used on the domains.
- Gfycat is a new embeds provider (with `gifv` player)
- HBR.org, tudou.com, forgifs.com, Google Drive - also added as new providers
- As whitelist is available to everyone now, we removed some of domains that are covered all right by generic parsers
- Whitelist now works for hosted oEmbed domains too. It looks at oEmbed discovery and if no domain record found, adds one by API domain. It coveres, for example, all custom domains of SmugMug, WordPress and Behance.
- Number of domains have been cleaned up. Pinterest boards, for one.

Cheerio library has been updated to a newer version. Please, `npm update`.


Happy 2015 again! And thanks for all your support in 2014!



### 2014.11.21, Version 0.7.1

This version contains mostly the cleanup of the domains plugins. Some of the most significant improvements are these:

- Proper handling of Imgur gifs that they changed recently
- Gallery embed for Flickr user profile pages
- Vine plugin uses newly introduced oEmbed endpoint. Processing time is now down to 50-70ms
- Google Plus posts with vanity URLs are finally supported
- Google Docs support
- Handle Tumblr's new 12-digit post IDs
- New or improved embed codes for C-Span, Reuters, Comedy Central, Rap Genius, Giphy, Real player cloud

The package dependencies updated some libraries. Please, run `npm update` to use newer verisons.

In the other news, we published [oEmbed API](http://oembedapi.com) for the use in open-source projects. Take a look.



### 2014.10.15, Version 0.7.0

**API Params.**

This release introduces filtering parameters both in [oEmbed API](https://iframely.com/docs/oembed-api) and [Iframely API](https://iframely.com/docs/iframely-api) formats.

The optional parameters in API calls are:

- `autoplay=true` or `1` - will give preference to `autoplay` media and will try to return it as primary `html`. Check for `autoplay` in primary `rel` to verify.
- `ssl=true` or `1` - will return only embeds that can be used under HTTPs without active SSL mixed-content warnings (images and mp4 videos trigger only passive warnings and thus will be passed)
- `html5=true` or `1`- will return only embeds that can be viewed on mobile devices or desktops without Flash plugin installed
- `maxwidth=` in pixels will return only embeds that do not exceed the desired width

**API Format changes**

The [Iframely API](https://iframely.com/docs/iframely-api) response has number of improvements.

- We added a root level `html` and `rel` fields that include embed data from most appropriate link according to your filtering params.
- For each embed link, we also added a field `html` with the generated HTML code to simplify server-server integrations (so that [iframely.js](https://iframely.com/docs/iframelyjs) isn’t required). This does not include image MIME type.
- Supplementary rel `ssl` is now included for all links that are SSL-proof.

These changes should be backwards-compatible. Report any compatibility issues you encounter on [GitHub](https://github.com/itteco/iframely).

**Other improvements**

- As usual, number of domain maintenance, including autoplay variants for YouTube, Vimeo, SoundCloud and Wistia
- Facebook posts and Pinterest embeds can now be adjusted based on your `max-width` value
- Added some domains, such as IMDB, Break.com, Zing.vn, Stitcher podcasts, Prostopleer
- PDF documents embeds via Google Docs Viewer
- Embed codes for Flash now go with `<embed>` html. To make this accurate, Flash and text/html links are double-checked for MIME-type. This involves additional HTTP request for the URL parsers and adds a little time to processing.



### 2014.08.14, Version 0.6.6

Maintenance version with number of small fixes and improvements in domain parsers and better parser for pages with several Open Graph videos.


### 2014.07.08, Version 0.6.5

Domains added:

+ podbean.com
+ slide.ly
+ clip.vn
+ squareup.com
+ quizlet.com
+ video.nationalgeographic.com
+ channel9.msdn.com/Events
+ c-span.org
+ indiegogo.com
+ rapgenius.com
+ vgtv.no
+ sverigesradio.se
+ medium.com
+ mixlr.com
+ twitch.tv
+ arte.tv


Domains maintenance:

* Fixed 9gag.com to find nice source image - big image or animated gif
* Fixed pinterest.com to prevent working on non-content urls
* Fixed thumbnail for speakerdeck.com
* Added video embed for smugmug.com
+ Added html5 tag to text/html players domains that support it


General improvements:

+ Added smart cache invalidation for iframely data per domain and plugin. Now plugin results cache will be invalidated after plugin file update or whitelist domain record update.
* Better support for open graph arrays
* Added support of grouped links in iframely.js
* Improved serverside oembed html attribute generation
+ Added meta plugin to detect page media (e.g. 'player', 'reader')
* Fix detecting correct charset when response headers charset not equals to html meta tag charset. Response header has priority now.
+ Updated iconv-lite to support more encodings. Please, run `npm update`.
+ Return 403 for non indexing content, according to [How to block Iframely API](http://iframely.com/docs/block-iframely).
9 changes: 6 additions & 3 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
VERSION: version,

SKIP_IFRAMELY_RENDERS: false,
DEFAULT_ASPECT_RATIO: 4 / 3,
DEFAULT_ASPECT_RATIO: 16 / 9,

T: {
text_html: "text/html",
Expand All @@ -47,6 +47,7 @@
image_png: "image/png",
image_svg: "image/svg",
image_gif: "image/gif",
image_webp: "image/webp",
video_mp4: "video/mp4",
video_ogg: "video/ogg",
video_webm: "video/webm"
Expand Down Expand Up @@ -78,7 +79,8 @@
"height",
"min-height",
"max-height",
"aspect-ratio"
"aspect-ratio",
"padding-bottom"
],

R: {
Expand Down Expand Up @@ -139,7 +141,8 @@
"photo"
],
"html-meta": [ // TODO: Need change to 'fb'.
"video"
"video",
"embedURL"
]
},

Expand Down
Loading

0 comments on commit c8b86c8

Please sign in to comment.