Created
May 23, 2014 14:49
-
-
Save einverne/e15d9bf6db49bf4a9e7d to your computer and use it in GitHub Desktop.
放放电影获取迅雷链接
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Xunlei Download link for ffdy.cc | |
// @namespace http://www.einverne.tk | |
// @version 2013.11.10 | |
// @description find the download link for xunlei | |
// @match http://www.ffdy.cc/teleplay/* | |
// @match http://www.ffdy.cc/movie/* | |
// @copyright 2013+, einverne | |
// ==/UserScript== | |
(function(){ | |
var textarea = document.createElement('textarea'); | |
var links = document.getElementsByClassName('XL_CLOUD_VOD_BUTTONyundianbo_btn_normal'); | |
console.log(links.length); | |
for (var i = 0; i < links.length; i++) { | |
var href = links[i].href; | |
var url = /vod\/\?url=(.+)/; | |
var downloadlinks = href.match(url); | |
textarea.innerHTML += decodeURIComponent(downloadlinks[1])+'\n'; | |
}; | |
textarea.style.height="100px"; | |
textarea.style.width ="725px"; | |
document.getElementsByClassName('resourcesmain')[0].appendChild(textarea); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment