diff --git a/lib/get-info.js b/lib/get-info.js index c07d0b09..9979f91c 100644 --- a/lib/get-info.js +++ b/lib/get-info.js @@ -688,7 +688,7 @@ var Getters = { /* WARNING: hacks inbound */ var options = { host: "docs.google.com", - path: "/file/d/" + id + "/view?sle=true", + path: "/file/d/" + id + "/get_video_info?sle=true", port: 443 }; @@ -709,16 +709,11 @@ var Getters = { return callback("HTTP " + status, null); } - /* - * Match [[anything]] and ignore whitespace - * Fix 2014-08-07: [^] matches \r\n, . doesn't. - */ - var m = res.match(/\[(\[\s*\[[^\[][^]*?\]\s*\])/); try { - var propertyList = JSON.parse(m[1]); var data = {}; - propertyList.forEach(function (kv) { - data[kv[0]] = kv[1]; + res.split("&").forEach(function (urlparam) { + var pair = urlparam.split("=").map(decodeURIComponent); + data[pair[0]] = pair[1]; }); if (data.hasOwnProperty("reason")) {