Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Vine video url

I love vinepeek and want to make something better.

I have the Vine link e.g. http://vine.co/v/bJqWrOHjMmU, however this is a link to a page, not the video URL.

I know it's new, but does Vine have an API, or how else would I be able to get the url of the video? I'm still puzzled as to how Vinepeek gets the video url?

like image 873
Bennett Avatar asked Jan 27 '13 16:01

Bennett


People also ask

How do you get your vine URL?

Once you have your user name you can go to https://vine.co/MyUserName and replace MyUserName with your username. If you do not remember your Vine username but shared any of your Vine's on Twitter you can go to the media tab of your profile page to find your Vines.

Where can I watch Vine Videos?

VinTV - Watch Vine Videos on the App Store.


1 Answers

It is in the page source; you could parse it with a JavaScript bookmarklet

function qry(sr) {
  var qa = [];
  for (var prs of sr.split('&')) {
    var pra = prs.split('=');
    qa[pra[0]] = pra[1];
  }
  return qa;
}

var alpha = document.querySelector('[name=flashvars]').getAttribute('value');
var bravo = qry(alpha);
bravo.src;

Result

https://vines.s3.amazonaws.com/videos/08C49094-DFB4-46DF-8110-EEEC7D4D6115-1133-000000B8AD9BE72C_1.0.1.mp4?versionId=TQGtC5O7G7H34TleFA2LF0Er9tI8VZUe

Source

like image 95
Zombo Avatar answered Oct 02 '22 04:10

Zombo