Mar 13, 2023 05:07 PM
Goal: A user can create a post including any version of a youtube or twitch URL. When the post is created it appears in a repeating group and the link appears as an embedded video.
Current State: The entire site is already built using a combination of airtable and bubble.io. This is the last feature that I need.
Work: I am open to ideas. What I know right now is that it can be done either with a Regex Formula or JavaScript Automation using the video id.
Budget: Hopefully, under $200. But we can discuss it, based on your idea.
Solved! Go to Solution.
Mar 16, 2023 11:56 PM
Roger that, here
And the formula used is:
IF(
FIND(
"twitch.tv",
{Embed Link Examples}
),
"https://clips.twitch.tv/embed?clip=",
IF(
OR(
FIND(
"youtube.com/",
{Embed Link Examples}
),
FIND(
"youtu.be/",
{Embed Link Examples}
)
),
"https://www.youtube.com/embed/"
)
) &
SUBSTITUTE(
REGEX_EXTRACT(
{Embed Link Examples},
"[^/]*$"
),
"watch?v=",
""
)
Mar 13, 2023 09:18 PM
The only way I can think of doing this involves having a list of the possible URL patterns and just hardcoding it really. Do you have a list like that?
Mar 14, 2023 03:14 PM
I am ok with hardcoding. I figured for the first solution I would have to. Here are the different versions of links I think I'll need to cover. Please let me know what you think.
Embed link: (what I need)
Submittable Links
Mar 15, 2023 04:09 PM
Hardcoding is what I expected. Here is a list of the URLs examples...
Embed Link Examples
Submittable Link Examples
Mar 15, 2023 04:17 PM - edited Mar 16, 2023 11:49 AM
@TheTimeSavingCo Hardcoding is what I expected, so that would work for me. Attached is a list of the email examples
Mar 16, 2023 11:56 PM
Roger that, here
And the formula used is:
IF(
FIND(
"twitch.tv",
{Embed Link Examples}
),
"https://clips.twitch.tv/embed?clip=",
IF(
OR(
FIND(
"youtube.com/",
{Embed Link Examples}
),
FIND(
"youtu.be/",
{Embed Link Examples}
)
),
"https://www.youtube.com/embed/"
)
) &
SUBSTITUTE(
REGEX_EXTRACT(
{Embed Link Examples},
"[^/]*$"
),
"watch?v=",
""
)