
我正在尋找一個腳本來繞過網站提供的鏈接1short.us直接取得下載連結。
有什麼辦法可以做到這一點嗎?
我找到了這個使用者腳本,但它無法繞過第二頁。
// @namespace TecHPrO
// @description Short Script Bypass u can add any site using this script
// @include http://1short.us/*
// ==/UserScript==
var n=location.pathname;
var exp= /m1.php/;
var x= n.search(exp);
if (x != -1)
{
var l=document.getElementsByName('groovybtn1')[0];
var s = l.getAttribute('onclick');
var s1= s.split("(\'");
var s2= s1[1];
var s3= s2.split("\',\'");
var s4= s3[0];
window.location= s4;}
else {
var p=location.href;
var c=p.split("http://");
var c1=c[0];
var c2=c[1].split("/");
var c3=c2[0];
var c4=c2[1]
window.location="http://"+c3+"/m1.php?id="+c4;
}
我找到了第二個使用者腳本,但它附加','name','800','800','yes');return%20false
到最終 URL。
這是代碼:
// ==UserScript==
// @name 1short.us
// @namespace 1short.us/*
// @include http://1short.us/*
// @version 1
// ==/UserScript==
/*! jQuery v1.8.3 jquery.com | jquery.org/license */
/* Contents of http://code.jquery.com/jquery-1.8.3.min.js */
//this is the place to work in lets test
//"NewWindow('mediafire_fix.php?url=http://www.mediafire.com/?a0unhxiksg47ejg','name','800','600','yes');return false"
var link =location.href;
link=link.replace("http://1short.us/","");
//alert(link);
var link2="";
$.get("http://1short.us/m1.php?",{'id':link} ,function(data){
link2=$(data).find(':button').attr('onclick');
link2=link2.replace("NewWindow('","");
link2=link2.replace("','name','800','600','yes');return false","");
location.href=link2
});
答案1
使用者腳本本身工作正常,但標題不完整。
第一行應該是:
// ==UserScript==
// @namespace TecHPrO
// @description Short Script Bypass u can add any site using this script
// @include http://1short.us/*
// ==/UserScript==
請注意,第一行丟失了。這會導致標頭被忽略,因此腳本將應用於全部網站。為了正常工作,它應該被限制在1short.us
網域的網站上。
事實上,用戶腳本從1short.us/368527
重定向到1short.us/m1.php?id=368527
,再從那裡重定向到turbobit.net/aveyd9fs89oc.html
。到目前為止,一切都很好。它應該停在這裡。
但是,由於缺少標頭,else
該語句區塊if
將再次執行,並且腳本重定向到turbobit.net/m1.php?id=aveyd9fs89oc.html
.這會導致 404。
第二個使用者腳本不起作用,因為 1short – 顯然 – 改變了新瀏覽器視窗的大小。對網站的任何更改都可能導致使用者腳本無用。
在這種情況下,該行
link2=link2.replace("','name','800','600','yes');return false","");
應該去掉 URL 中不需要的部分,但實際的 URL 結尾為:
','name','800','800','yes');return false
將使用者腳本的該行更改為
link2=link2.replace("','name','800','800','yes');return false","");
(即替換600
為800
) 將修復它。