本文介绍了如何获得Vine视频网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢并希望做得更好。

I love vinepeek and want to make something better.

我有Vine链接,例如 http://vine.co/v/bJqWrOHjMmU ,但这是指向网页的链接,而非视频网址。

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

我知道这是新的,但Vine有一个API,或者我怎么能得到视频的网址?我仍然对Vinepeek如何获取视频网址感到困惑?

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?

推荐答案

它位于页面源中;你可以用JavaScript书签来解析它

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;

结果

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

这篇关于如何获得Vine视频网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-22 08:35