Iframely
-
Continuing the discusstion from here: https://what.thedailywtf.com/topic/19183/one-last-bug-before-we-go-go/51
@sloosecannon said:
@loopback0 said:
I need to click Youtube links now, like some kind of savage?
@administrators can we install nodebb-plugin-iframely or similar?
There is an iframely plug-in. Looks like you have to hook that up to iframely running somewhere. I got a developer API key, good for 1,000 hits per month. That's not appropriate for here. I haven't looked into other pricing options.
There is apparently an open source version of their parser, though:
Not sure if that's a reasonable alternative.
-
@boomzilla No idea on the pricing / free version stuff, but iframely seemed to work well when I tested it: it sure parsed stuff that's in the spec better than Discourse (as in: Discourse completely ignored it)
-
@boomzilla said:
That's not appropriate for here
FWIW that's basically 1000 oneboxes posted. Not sure if that changes the calculation, but a post load doesn't count as an API call.
-
@ben_lubar said:
it looks like the API counts a "hit" as a unique URL once per hour. So 1000 hits per month is approximately 1.3 URLs.
-
@Onyx Pricing here:
$19 - $199 per month is the range. I have no idea what we'd generate around here in terms of how they count hits.
-
I followed the setup stuff here:
Basically, I have it running in the same VM as my NodeBB dev instance. I just changed the plugin's base url to
http://boomzillasvm:8061/iframely
and only configured thebaseAppUrl
in theconfig.local.js
and it seems to work.
-
Wow, this is "interesting." The results look different on chrome vs firefox. I've only tried youtube and twitter so far. The sizes of the embedded videos aren't static.
On chrome, a tweet with an image shows the image. Not on FF.
-
@boomzilla pics or it didn't happen
-
@boomzilla maybe same-origin stuff gets handled differently?
-
-
-
lol
-
-
-
@boomzilla said:
I followed the setup stuff here:
Basically, I have it running in the same VM as my NodeBB dev instance. I just changed the plugin's base url to
http://boomzillasvm:8061/iframely
and only configured thebaseAppUrl
in theconfig.local.js
and it seems to work.@ben_lubar ... I think this is the way to go on here. Setup requires shell access, obviously. @PJH ?
-
@boomzilla ok, how's that?
-
Yeah, 1k hits a month may be a bit too low. NodeBB does cache the results, so repeated calls aren't made.
-
That... is huge.
-
Unfortunately, the link to https://github.com/itteco/iframely/blob/master/docs/SETUP.md turns into a link to https://what.thedailywtf.com/topic/19305/iframely/15 ... not sure what all that's about. Otherwise, huge
-
-
@svieira said:
Unfortunately, the link to https://github.com/itteco/iframely/blob/master/docs/SETUP.md turns into a link to https://what.thedailywtf.com/topic/19305/iframely/15 ... not sure what all that's about. Otherwise, huge
Wait, so iFramely one-boxes any link? Shouldn't it only do links that start on a new line?
Am I missing something here????
-
@ben_lubar said:
@svieira said:
not sure what all that's about
hmm, it has a href attribute but it's empty.
Oh.. crap. I encountered that. How did I fix it........
starts digging around in things
-
@sloosecannon said:
@ben_lubar said:
@svieira said:
not sure what all that's about
hmm, it has a href attribute but it's empty.
Oh.. crap. I encountered that. How did I fix it........
starts digging around in things
https://github.com/NodeBB/nodebb-plugin-iframely/pull/9
- check to see if that patch is integrated into our current version of iframely @ben_lubar.
-
@sloosecannon It's at
static/templates/partials/iframely-link-title.tpl:3
- make sure the line reads<a href="{embed.meta.canonical}" target="_blank" rel="nofollow">
and not
<a href="{embed.canonical.meta}" target="_blank" rel="nofollow">
-
@sloosecannon yep, it has that correctly. must be something else :/
-
@ben_lubar Hmm.
Any way to check what the iframely service is feeding back? Maybe the url is getting lost somewhere there...
-
@sloosecannon nginx log entry:
52.91.192.100 - - [21/Mar/2016:02:21:13 +0000] "GET /iframely?url=https://github.com/itteco/iframely/blob/master/docs/SETUP.md&group=true HTTP/1.1" 200 3977 "-" "-"
-
@ben_lubar
So, here's what our Iframely hosted install responds with...{ "meta": { "title": "itteco/iframely", "canonical": "https://github.com/itteco/iframely/blob/master/docs/SETUP.md", "description": "iframely - oEmbed proxy. Supports over 1600 domains via custom parsers, oEmbed, Twitter Cards and Open Graph", "site": "GitHub" }, "links": { "thumbnail": [ { "href": "https://avatars1.githubusercontent.com/u/28843?v=3&s=400", "type": "image/png", "rel": [ "twitter", "thumbnail", "ssl", "og" ], "content_length": 55893, "media": { "width": 400, "height": 400 } } ], "icon": [ { "href": "https://github.com/apple-touch-icon-180x180.png", "rel": [ "apple-touch-icon", "icon", "ssl" ], "type": "image/png", "media": { "width": 180, "height": 180 } }, { "href": "https://github.com/apple-touch-icon-152x152.png", "rel": [ "apple-touch-icon", "icon", "ssl" ], "type": "image/png", "media": { "width": 152, "height": 152 } }, { "href": "https://github.com/apple-touch-icon-144x144.png", "rel": [ "apple-touch-icon", "icon", "ssl" ], "type": "image/png", "media": { "width": 144, "height": 144 } }, { "href": "https://github.com/apple-touch-icon-120x120.png", "rel": [ "apple-touch-icon", "icon", "ssl" ], "type": "image/png", "media": { "width": 120, "height": 120 } }, { "href": "https://github.com/apple-touch-icon-114x114.png", "rel": [ "apple-touch-icon", "icon", "ssl" ], "type": "image/png", "media": { "width": 114, "height": 114 } }, { "href": "https://github.com/apple-touch-icon-76x76.png", "rel": [ "apple-touch-icon", "icon", "ssl" ], "type": "image/png", "media": { "width": 76, "height": 76 } }, { "href": "https://github.com/apple-touch-icon-72x72.png", "rel": [ "apple-touch-icon", "icon", "ssl" ], "type": "image/png", "media": { "width": 72, "height": 72 } }, { "href": "https://github.com/apple-touch-icon-60x60.png", "rel": [ "apple-touch-icon", "icon", "ssl" ], "type": "image/png", "media": { "width": 60, "height": 60 } }, { "href": "https://github.com/apple-touch-icon-57x57.png", "rel": [ "apple-touch-icon", "icon", "ssl" ], "type": "image/png", "media": { "width": 57, "height": 57 } }, { "href": "https://github.com/apple-touch-icon.png", "rel": [ "apple-touch-icon", "icon", "ssl" ], "type": "image/png" }, { "href": "https://assets-cdn.github.com/pinned-octocat.svg", "rel": [ "mask-icon", "icon", "ssl" ], "type": "image/svg" }, { "href": "https://assets-cdn.github.com/favicon.ico", "rel": [ "icon", "ssl" ], "type": "image/x-icon" }, { "href": "https://github.com/fluidicon.png", "rel": [ "fluid-icon", "icon", "ssl" ], "type": "image/png" } ] }, "rel": [] }
Versus the official Iframely API:
{ "id": "h1nY9i", "url": "https://github.com/itteco/iframely/blob/master/docs/SETUP.md", "meta": { "site": "GitHub", "description": "iframely - oEmbed proxy. Supports over 1600 domains via custom parsers, oEmbed, Twitter Cards and Open Graph", "canonical": "https://github.com/itteco/iframely/blob/master/docs/SETUP.md", "title": "itteco/iframely" }, "links": { "thumbnail": [ { "media": { "height": 400, "width": 400 }, "content_length": 55893, "rel": [ "thumbnail", "ssl" ], "type": "image/png", "href": "https://avatars1.githubusercontent.com/u/28843?v=3&s=400" } ], "icon": [ { "media": { "height": 180, "width": 180 }, "type": "image/png", "rel": [ "apple-touch-icon", "icon", "ssl" ], "href": "https://github.com/apple-touch-icon-180x180.png" }, { "media": { "height": 120, "width": 120 }, "type": "image/png", "rel": [ "apple-touch-icon", "icon", "ssl" ], "href": "https://github.com/apple-touch-icon-120x120.png" }, { "media": { "height": 114, "width": 114 }, "type": "image/png", "rel": [ "apple-touch-icon", "icon", "ssl" ], "href": "https://github.com/apple-touch-icon-114x114.png" }, { "media": { "height": 72, "width": 72 }, "type": "image/png", "rel": [ "apple-touch-icon", "icon", "ssl" ], "href": "https://github.com/apple-touch-icon-72x72.png" }, { "media": { "height": 60, "width": 60 }, "type": "image/png", "rel": [ "apple-touch-icon", "icon", "ssl" ], "href": "https://github.com/apple-touch-icon-60x60.png" }, { "media": { "height": 57, "width": 57 }, "type": "image/png", "rel": [ "apple-touch-icon", "icon", "ssl" ], "href": "https://github.com/apple-touch-icon-57x57.png" }, { "type": "image/png", "rel": [ "apple-touch-icon", "icon", "ssl" ], "href": "https://github.com/apple-touch-icon.png" }, { "type": "image/svg", "rel": [ "mask-icon", "icon", "ssl" ], "href": "https://assets-cdn.github.com/pinned-octocat.svg" }, { "type": "image/x-icon", "rel": [ "icon", "ssl" ], "href": "https://assets-cdn.github.com/favicon.ico" }, { "type": "image/png", "rel": [ "fluid-icon", "icon", "ssl" ], "href": "https://github.com/fluidicon.png" } ] }, "rel": [ "summary", "ssl", "html5", "inline" ], "html": "<a href=\"https://github.com/itteco/iframely/blob/master/docs/SETUP.md\" data-iframely-url=\"//cdn.iframe.ly/h1nY9i\" data-template=\"inline\"></a><script async src=\"//cdn.iframe.ly/embed.js\" charset=\"utf-8\"></script>" }
Ours is missing a "url" parameter, but I don't think it ever gets used?
I'd look there...
-
@sloosecannon Uh, I hate to burst your bubble, but...
That sure looks like the canonical is inside the meta to me.
-
@ben_lubar said:
@sloosecannon Uh, I hate to burst your bubble, but...
That sure looks like the canonical is inside the meta to me.
It is, but "url" is not in the parent object.
I don't see why that would change anything, but there's a difference in the response for some reason
-
@sloosecannon said:
@ben_lubar said:
@sloosecannon Uh, I hate to burst your bubble, but...
That sure looks like the canonical is inside the meta to me.
It is, but "url" is not in the parent object.
I don't see why that would change anything, but there's a difference in the response for some reason
So, reading
https://iframely.com/docs/meta
- they should probably not be usingmeta.canonical
, because the docs say anything inmeta
is a "may include". They really should be usingurl
on the main object. Which makes me wonder why our setup doesn't send anything inurl
-
Assorted links:
http://imgur.com/gallery/W5zGaQa
http://imgur.com/a/zBcEz
-
@sloosecannon said:
Which makes me wonder why our setup doesn't send anything in url
I don't see anything that looks like it affects that in this file...
-
-
@ben_lubar said:
@sloosecannon said:
Ours is missing a "url" parameter, but I don't think it ever gets used?
Oh... that'll do it
-
@sloosecannon I think I'll just change that one template to use the canonical url and call it a day.
-
@ben_lubar Yeah. Something should probably be done about that in the future but that's the easiest and cleanest fix...
-
As an aside, this seems to break the scroll-to functionality, as all the frames change size once they load and screw up the end position...
-
@Tsaukpaetra urgh... hello Jellypotato.
Should we file a bug on the iframely plugin GitHub?
-
@sloosecannon said:
iframely plugin GitHub?
Is there a way to re-trigger the scroll-to event from a plugin's actions? Maybe!
-
@Tsaukpaetra said:
@sloosecannon said:
iframely plugin GitHub?
Is there a way to re-trigger the scroll-to event from a plugin's actions? Maybe!
I was thinking change the post to have template HTML with the size of the embed... but that works too
-
@Buddy found a bug:
This url
Which is a link tohttps://productforums.google.com/forum/m/#!topic/youtube/6gXSaGA3xD4
gets oneboxed to
https://productforums.google.com/forum/m/
It originally occured here: https://what.thedailywtf.com/topic/19323/youtube-cannot-into-enter/1
-
@aliceif Yay for hash fragments!
-
Twitch.tv streams should never get oneboxed.
-
@boomzilla Ok, it's wrong and broken and is causing people to unwittingly DDOS YouTube and get themselves banned as spammers.
Who the fuck installed this? Turn it off.
-
@boomzilla Good sample tweet you picked, but this plugin has a lot of HUGE bugs that need fixed BEFORE we install it.
-
@aliceif done.
-
@ben_lubar If you're disabling shit, you should disable YouTube until the preview window DDoS is fixed.
And feel shame that you didn't notice it while making your test posting above.
-
@blakeyrat I've blacklisted youtube.com, www.youtube.com and youtu.be.
-
@aliceif Why not? My guess is that the UX for those is still broken and they autoplay on embed?