I
I
Igor Tkachenko2014-04-10 22:27:00
In contact with
Igor Tkachenko, 2014-04-10 22:27:00

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

1 answer(s)
I
Igor Tkachenko, 2014-04-11
@foozzi

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 question

Ask a Question

731 491 924 answers to any question