AAuto 115网盘真实地址解析工具

原文链接:http://www.oschina.net/code/snippet_101424_6656

import win.ui;
import win.util.tray;
import com;
import web.json
import inet.whttp;
/*DSG{{*/
var winform = win.form(parent=...; right=519;text="115网盘真实地址解析工具";bottom=299 )
winform.add( 
telecomUrl={ bottom=179;right=391;left=49;multiline=1;top=150;font=LOGFONT( name="SimSun";h=-12 );z=6;text="";edge=1;cls="edit" };
digBtn={ bottom=72;text="解析";left=433;top=40;font=LOGFONT( name="SimSun";h=-12 );z=5;right=507;cls="button" };
static={ bottom=148;right=87;left=48;top=131;font=LOGFONT( name="SimSun";h=-12 );transparent=1;z=8;text="电信";cls="static" };
inputUrl={ bottom=92;text="提取码或地址";left=21;top=20;font=LOGFONT( name="SimSun";h=-12 );z=2;right=418;edge=1;cls="groupbox" };
hashUrl={ bottom=71;right=388;left=46;top=42;font=LOGFONT( name="SimSun";h=-12 );z=3;text="http://u.115.com/file/dn446hah";edge=1;cls="edit" };
unicomUrl={ bottom=241;right=391;left=49;multiline=1;top=212;font=LOGFONT( name="SimSun";h=-12 );z=4;text="";edge=1;cls="edit" };
电信下载={ bottom=182;text="迅雷下载";left=433;top=150;font=LOGFONT( name="SimSun";h=-12 );z=10;right=507;cls="button" };
richedit={ bottom=324;right=726;left=725;top=323;font=LOGFONT( name="SimSun";h=-12 );z=7;text="richedit";edge=1;cls="richedit" };
网通下载={ bottom=244;text="迅雷下载";left=433;top=212;font=LOGFONT( name="SimSun";h=-12 );z=11;right=507;cls="button" };
static2={ bottom=210;right=121;left=48;top=193;font=LOGFONT( name="SimSun";h=-12 );transparent=1;z=9;text="网通";cls="static" };
resultArea={ bottom=272;text="真实地址";left=23;top=112;font=LOGFONT( name="SimSun";h=-12 );z=1;right=420;edge=1;cls="groupbox" }
)
/*}}*/

var thunder = com.CreateObject("ThunderAgent.Agent.1")
var thunderDown = function(url){
    thunder.AddTask(url,"","","" ,"", 1, 0, 5);
    thunder.CommitTasks();
}

var dig = function(url){
    var http = inet.whttp();
    var urlCode = string.replace(url,"@http://u.115.com/file/","");
    var urlCode = string.format("http://uapi.115.com/?ct=upload_api&ac=get_pick_code_info&pickcode=%s&version=1176", urlCode);
    var json = http.get(urlCode)
    var jsonTab = web.json.decode( json );
    
    (function(jsonTab){
        if (jsonTab.Message=="ok"){
            telecomRet = string.replace( jsonTab.DownloadUrl[1].Url,"@\","" )
            unicomRet = string.replace( jsonTab.DownloadUrl[2].Url,"@\","" )
        }           
    })(jsonTab);
    
        return telecomRet,unicomRet;    
}

var telecom = winform.telecomUrl
var unicom = winform.unicomUrl
winform.digBtn.oncommand = function(id,event){
    telecom.text = "";
    unicom.text = "";
    var hashUrl = winform.hashUrl.text
    var telecomUrl,unicomUrl= dig(hashUrl)
    telecom.text = telecomUrl
    unicom.text = unicomUrl 
};

winform.电信下载.oncommand = function(id,event){
    thunderDown(telecom.text)   
}

winform.网通下载.oncommand = function(id,event){    
    thunderDown(unicom.text)
}

winform.show() 
win.loopMessage();


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值