[nodebb-plugin-ns-embed] NS Embed
-
@Nicolas said in [nodebb-plugin-ns-embed] NS Embed:
Version 4.0.0
The new version is available.
- Added support for post preview of the embedded content
- Changed dependencies to comply with the most security updates
- Changed compatibility with NodeBB v1.13.x
Thanks for the update!
-
@Nicolas said in [nodebb-plugin-ns-embed] NS Embed:
@FrankM Twitter embed is using
script
injection. The latest update to the plugin adheres to the security changes in NodeBB. I think should be a separate plugin for Twitter embeds with the efficient lazy loading for necessary scripts, etc. This plugin works the best with the embeds which are based on iframe.We are using it as custom http:// redirect it to https:// ?
Please guide!
demo -
Updated a nodeBB to 1.13, all seems relatively fine, though, I was not paying attention and I updated to v1.13.4-3. - that's ok for now, seems to work.
However the ns-embd plugin is not embedding tweets, just leaving a blank blockquote. Youtube videos embed perfectly fine, so I suspect the watch + replace needs tweaking?
Watch
(?:<a.*?)?(?:https?:\/\/)?(?:twitter\.com)\/([^\/\"\s]*)\/status\/([^\/\"\s]*)(\/photo\/\d|)(?:.*?\/a>)?
Replace
<blockquote class="twitter-tweet"><a href="https://twitter.com/$1/status/$2?ref_src=twsrc^tfw"></a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
-
@omega we had the same problem with facebook and twitter links in 1.13.3
I opened this issue several weeks ago, but they did not check yet...
-
@crazycells Ok cool tx!
-
For MP4 local Upload with plugin Composer Quill :
watch :
<a href\="/assets/uploads/files/((?:(?!\.mp4" target\="_blank">)(?:.|\n))*)\.mp4" target\="_blank">((?:(?!\.mp4</a>)(?:.|\n))*)\.mp4</a>
replace :
<video id="$1" src="/uploads/files/$1.mp4" controls style="width:800px"></video>
-
How would someone do a dropbox link??
Been trying to mess with it this is an example for the format
https://www.dropbox.com/s/7psik9l7x0ec099/Dylan%20Ivey.mp4
-
Has anyone gotten bitchute.com vids to work with the ns-embed plugin?
-
@crazycells said in [nodebb-plugin-ns-embed] NS Embed:
@omega we had the same problem with facebook and twitter links in 1.13.3
I opened this issue several weeks ago, but they did not check yet...
Hey @crazycells Do you know if this has been fixed and is this plugin compatible with the latest version of nodeBB?
-
@omega said in [nodebb-plugin-ns-embed] NS Embed:
@crazycells said in [nodebb-plugin-ns-embed] NS Embed:
@omega we had the same problem with facebook and twitter links in 1.13.3
I opened this issue several weeks ago, but they did not check yet...
Hey @crazycells Do you know if this has been fixed and is this plugin compatible with the latest version of nodeBB?
I am not sure, I will check it and update here...
For some time we were using
nodebb-plugin-twitter
for twitter embeds, andnodebb-plugin-iframely
plugin for facebook embeds... -
Does anyone gotz a viable
regex
that works with bitchute.com videos with the plugin nodebb-plugin-embed they wish to share for the benefit of the masses?My feeble attempts using such:
(?:<a.*?)?(?:https?:\/\/)?(?:www\.)?bitchute\.com\/video\/([a-zA-Z0-9_-]{4,11})(?:.*?\/a>)?
or
https?:\/\/(?:www)?\.?bitchute\.com\/video\/([a-zA-Z0-9]{1,64})\/
Have resulted in an empty iframe thus far.
-
@omega said in [nodebb-plugin-ns-embed] NS Embed:
(?:www.)?bitchute.com/video/([a-zA-Z0-9_-]{4,11})(?:.*?/a>)?
Both of those worked for me.
Are you replacing with the embed link?
<div class='embed-wrapper'><div class='embed-container'><iframe src='https://www.bitchute.com/embed/$1' frameborder='0' allowfullscreen></iframe></div></div>
-
Thanks @yariplus I had not way to test that regex, I saw the iframebtu empty and though that code was ok, but since the regex worked it was the code as you suspected.
I had a spurious level in there:
/embed/video/$1
As per your embed link it only required -
/embed/$1
-
@yariplus If i could be so bold and throw up another embed puzzle.
This time rumble, and with mixed success, if you paste an embed link form rumble for e.g.
https://rumble.com/ve2ez5
This works, but currently displaying a random rumble video.
Here is the long URL for the same video for reference:
https://rumble.com/ve2ez5-airplane-returns-to-denver-after-engine-malfunction.html
This is what I have so far that works to embed and display a rumble video but misses the target video!
replace:
(?:<a.*?)?(?:https?:\/\/)?(?:www\.)?rumble\.com\/([a-zA-Z0-9_-]{4,6})(?:.*?\/a>)?
embed:
<div class='embed-wrapper'><div class='embed-container'><iframe src='https://www.rumble.com/embed/rumble_$1/?pub=4' frameborder='0' allowfullscreen></iframe></div></div>
-
RUMBLE
Ok this combo works for me using the the Rumble Embed link that is available on a rumble videos page, e.g. below:
https://rumble.com/embed/vbenc7/?pub=4
Watch
(?:<a.*?)?(?:https?:\/\/)?(?:www\.)?rumble\.com\/embed\/([a-zA-Z0-9_-]{4,6})(?:.*?\/a>)?
Embed:
<div class='embed-wrapper'><div class='embed-container'><iframe iframe class="rumble" width="640" height="360" src='https://www.rumble.com/embed/$1/?pub=4' frameborder='0' allowfullscreen></iframe></div></div>
Not sure how to get the regex to deal with someone who pastes in a full URL for e.g.:
https://rumble.com/ve0tib-newborn-calf-takes-first-clumsy-steps-to-get-milk-from-his-mother.html
-
@omega said in [nodebb-plugin-ns-embed] NS Embed:
Newborn calf takes first clumsy steps to get milk from his mother
Bernice is a beautiful cow with a wonderful personality. She lives on a gorgeous farm in the hills of Millbrook, Ontario. Its one of the most perfect farms in Canada, with hundreds of acres of lush, g
Rumble (rumble.com)
I don't think it's possible. There doesn't appear to be any direct conversion, or even metadata to grab. Would have to scrape the whole page.
Or apparently, use iframely
-
Here we go, I see this one getting used from time to time to host files. Including .mov files.
https://catbox.moe
Usually (not real link)
https://files.catbox.moe/123Abc.mov
I almost have it but I don't. I'm getting a 404 in the embed window.
Replace:
(?:<a.*?)?(?:https?:\/\/)?(?:www\.)?catbox\.moe\/([a-zA-Z0-9_-]{1,24})\.mov?(?:.*?\/a>)?
Embed:
<div class='embed-wrapper'><div class='embed-container'><iframe src='https://files.catbox.moe/$1' frameborder='0' allowfullscreen></iframe></div></div>
I didn't spend to long messing with it to get it to work yet.
I should probably sit down and learn regex at this point.