Answer the question
In order to leave comments, you need to log in
What are examples of parsing information from a link?
Are there examples of parsing information about a video, for example, by ajax link (as in VKontakte when inserting a link to a video or site)?
Answer the question
In order to leave comments, you need to log in
made a solution:
function getInfoVideo(url){
if(url.length > '7'){
if(url.match('http://youtube.com') || url.match('https://youtube.com')){
$.ajax({
url: 'https://www.youtube.com/oembed?url='+url+'&format=json',
type: 'GET',
dataType: 'jsonp',
success: function(data){
// data - all meta for youtube video
}
})
}
//#TODO ADD VK AND COUB
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question