identify if Instagram embed code is for photo or video - embed

Users of my website will enter Instagram embed codes. Do you know of an algorithmic way to identify if the Instagram embed code is for photo or video?

Call this API:
https://api.instagram.com/v1/media/shortcode/{short-code}?access_token=ACCESS-TOKEN
and then get the data.type in response, it will have either "image" or "video"

Related

Can YouTube API retrieve captions of an unlisted video?

Is it possible to retrieve the captions track for an unlisted video using the YouTube Data API v3? The video is in a playlist and has a known URL, but I am not the content owner.
What I have tried:
captions/list does not find video with matching ID.
playlistItmes/list returns the correct video ID, but no new information that lets it work with captions/list.
Youtube API get unlisted videos
Maybe there is a URL approach similar to this?

Get Vimeo thumbnails for private videos

I have a list of Vimeo private video urls (https://player.vimeo.com/video/1234567890), which I'd like to display as thumbnails on my page.
I can't find a working way to do it.
Any solutions based on http://vimeo.com/api/v2/video/{id} are long dead.
And something like this https://i.vimeocdn.com/video/1234567890.jpg would return the wrong image.
Is there a way to get an image thumbnail url based on video id without authorization ?
UPDATE
In my case, I manged to get the thumbnail_url by querying
GET https://vimeo.com/api/oembed.json?url=https://player.vimeo.com/video/{id}
oEmbed can be used to get a video's thumbnail links, depending on the video's privacy settings.
First off, oEmbed will only return metadata when the video has embed privacy set to "Embed Anywhere" or "Only on site I choose". A video with its embed privacy to "Embed Nowhere" will return 403.
Videos with these viewing privacy settings will return "full" metadata (including thumbnail links):
Anyone
Only people with the private link (must use the complete video url)
Hide this video from vimeo.com
Videos with these viewing privacy settings will only return the embed code:
Only people I follow
Only people I choose
Only people with a password
oEmbed documentation can be found here: https://developer.vimeo.com/apis/oembed
I just found the solution for getting the Meta Data from Vimeo, with private videos. You can see the solution here:
VIMEO not consistently returning video title, duration or thumbnail url : REMOTE HEADER?

Embed vimeo videos where token is required

I'd like to know whether there's a way to directly embed a vimeo video into a website or whether there's a way to get a stable link to the MP4 file.
E.g. this page: http://www.landfunker.de/ktv/detail.php?rubric=93&nr=86411. The video is only launched when accessing it from that page. In the source code, I see links like
fpdl.vimeocdn.com/vimeo-prod-skyfire-std-us/01/3026/7/190133161/631209312.mp4?token=587a20e2_0xece9d9d127813f2b792edb30032d4d9b0a7c484f
However, the tokens expire, right. Any tips? Any workarounds.thx
Use the Vimeo iframe embed code to embed videos on your site:
https://help.vimeo.com/hc/en-us/sections/203874347-Embedding-Videos
https://developer.vimeo.com/apis/oembed
To get the MP4 links for video files, you'll need to be a Vimeo PRO or Business member. Video file links are returned in the individual video's response from the API.
GET https://api.vimeo.com/videos/[video_id]
You can use the API's JSON fields filter to only return the video file links:
GET https://api.vimeo.com/videos/[video_id]?fields=files
Finally, note that you can only retrieve the video file links for videos on your own PRO or Business account. Vimeo does not provide a way to retrieve the video file links for videos on other user accounts.
API documentation can be found here: https://developer.vimeo.com/api/start
You can definitely embed a Vimeo video into a website - Vimeo provides instructions on their website:
To get your video's embed code, go to its video page and click the Share button. Then click the +Show options link that appears above the embed code field to reveal a preview of your embedded video with the Basic customization options. Once you've made your adjustments, you can copy the embed code and paste it wherever you'd like to embed your video.
They also provide an API based embed approach using oEmbed. There is a JavaSCript example using this here:
https://github.com/vimeo/vimeo-oembed-examples/blob/master/oembed/js-example.html
This basically calls the API with the URL of the video to embed and the response includes HTML which you append to your page.

HTML YouTube to Show All Videos?

Anyone know how to add the full upload feed from YouTube to a website using html coding??? I've been able to get single videos, but haven't found anything regarding all videos.
if you want to use the Youtube Data API you can retrieve all videos on a specific channel.
If you just wanted to embed a full upload feed from a channel, as this question states you can use the channel embed code, for example:
<script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube.xml&up_channel=YourChannelName&synd=open&w=320&h=390&title=&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>

VEVO.com video thumbnail

How do I access the url for a vevo video thumbnail? youtube makes it easy by hosting predicatably located images, and vimeo requires that you go through their api. But what about vevo? For example, give the following embed code:
How do I access a corresponding thumbnail?