-
Notifications
You must be signed in to change notification settings - Fork 15
1.3 aboutScript(not finished)
//Sample
spymac.vbs|vbscript|UTF-8|photo|http://www.spymac.com/*
//Explain
1.file_name|2.script_type|3.chareset|4.photo_or_album|5.url_adress
字段 | 说明 |
---|---|
1.file_name | 脚本文件名,如:pixiv.vbs |
2.script_type | 脚本类型:vbscrpit / javascript(jscrpit) |
3.chareset | 页面字符编码格式(GB2312,UTF-8等) |
4.photo_or_album | 相册类型:photo / album [1-1] |
5.url_adress | 网页地址 [1-2] |
[1-1]
photo / album
photo: 单个相册(图片列表)
album: 多个相册(相册列表)
[1-2]
网页地址(使"?"、"*"等符号进行模糊定义)
比如:http://photo.163.com/photos/?*/?* ("?":1个字符;"*":0到n个字符;"?*":1到n个字符)
脚本功能描述:可以使用过程、模块、变量、msgbox、inputbox等
系统保留变量 | 属性 | 说明 |
---|---|---|
OX163_urlpage_Referer | 赋值 | 改变下载html代码使用的引用页、User-Agent、cookie[1],留空为不使用 |
OX163_urlpage_Cookies | 只读 | 每次下载页面之前,和下载页面之后,均会自动更新当前链接的cookies赋值给该变量 |
系统转义字符 | 属性 | 说明 |
---|---|---|
&for_ox163_replace_vline& | 常量 | 在不能使用“|”的地方替换vline |
&for_ox163_replace_vbcrlf& | 常量 | 在不能使用“回车”的地方替换vbcrlf |
[1]
//要定义Referer地址,第一行必须是"引用页超链接"、"引用页类型"或者"引用页类型"
//引用页类型(me / dir / root / parent)请看[2-3]
//Sample-1 only Referer
OX163_urlpage_Referer="me"
//Sample-2 only Referer
OX163_urlpage_Referer="https://www.pixiv.net"
//Sample-3 only User-Agent
OX163_urlpage_Referer="User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
//Sample-4 Referer and User-Agent
OX163_urlpage_Referer="https://www.pixiv.net" & vbcrlf &_
"User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"
//改变网站cookies
//Sample-5
OX163_urlpage_Referer="https://www.pixiv.net" & vbcrlf &_
"cookie:uid=hein;tID=e29:T=15;aaa=bbb"
Function1:return_download_url
作用:用于进一步校正url的正确性,返回正确的url用于下载html页面源文件
//Sample
Function return_download_url(byVal url_str)
//url_str 被OX163赋值为当前输入的下载前的原始超链接(不会被脚本格式化)
url_str=custom_format(url_str)//编写脚本格式化原始超链接
return_download_url="inet|10,13|" & url_str & "|root|post_method"
End Function
返回格式:1.inet_or_web|2.Cls_ChrCode|3.url_str[|4.dlpic_refer_url][|5.post_method]
当return_download_url=""或者return_download_url="0"时,终止外部脚本
字段 | 必须 | 说明 |
---|---|---|
1.inet_or_web | 是 | OX163两种页面下载格:inet / web[2-1] |
2.Cls_ChrCode | 否 | 需要清除的ASCII字符,建议清除“13,10”也就是vbcr(\r)与vblf(\n);0为不清除 |
3.url_str | 是 | 即经过格式化后的url,OX163将现在该url的html文本 |
4.dlpic_refer_url | 否 | 下载图片时的引用页信息[2-2],或引用页类型(me / dir / root / parent)[2-3] |
5.post_method | 否 | 使用post方式发送请求[2-4] |
//return_download_url不能使用的字符
3.url_str、4.referce_url和5.post_method不能含有“|”与“回车”
必须把“|”替换为“&for_ox163_replace_vline&”
必须把“回车”替换为“&for_ox163_replace_vbcrlf&”
[2-1]
inet:下载html源文件(源码可能会因为系统设置的Referer)
web:页面显示的全部信息(类似maxthon viewpage功能里面的源码)
[2-2]
1、dlpic_refer_url不作用于html代码下载环节,仅作用于OX163下载图片时。
html代码下载环节请使用系统保留变量:OX163_urlpage_Referer[1]
2、引用页,即http header里的referer信息,如填写:http://moe.imouto.org/
有些网站会检测这个信息,如果不是相同域名下的信息,会返回错误的页面
[2-3]
3、引用页类型,可以填写(me/dir/root/parent)四种,用于简化填写的内容:
me:即为当前的url信息,http://moe.imouto.org/data/f9/b1/111.html
dir:当前目录级链接地址,http://moe.imouto.org/data/f9/b1/
root:根目录链接地址,http://moe.imouto.org/
parent+数字:
parent2,根目录root下2级目录地址,http://moe.imouto.org/data/f9/
parent:=me,http://moe.imouto.org/data/f9/b1/111.html
[2-4]
//不使用get而改用post方式发送请求
post_date="scriptSessionId=${scriptSessionId}187" & "&for_ox163_replace_vbcrlf&" &_
"c0-id=0" & "&for_ox163_replace_vbcrlf&" &_
"c0-param0=string:" & user_id & "&for_ox163_replace_vbcrlf&" &_
"batchId=" & Int(Time() * 1000000)
return_download_url="inet|10,13|http://photo.163.com/dwr/getUserSpace.dwr||" & post_date
填写时,如果没有4.referce_url信息,需要留空4.dlpic_refer_url一栏
Function2:return_download_list
作用:分析return_download_url之后下载的html代码,返回页面图片信息,或者返回下一个需要下载的页面地址
//Sample
Function return_download_list(byVal html_str,byVal url_str)
//html_str 下载到的html的代码信息(已被return_download_url-2.Cls_ChrCode格式化)
//url_str 本次下载的html的url信息
//建议初始化
return_download_url=""
//编写脚本取得所需列表内容
return_download_url="jpg|http://www.spymac.com/upload/XmBhIoPMTu|logo1.jpg|it's a logo1"
return_download_url=return_download_url & vbcrlf &_
"png|http://www.spymac.com/upload/rtjgbhjXmg|logo2.png|it's a logo2"
//编写脚本取得下一个页面地址
url_str=custom_next_htmlurl_function(html_str,url_str)
//填写尾行
return_download_url=return_download_url & vbcrlf &_
"1|inet|10,13|" & url_str & "|root|post_method"
End Function
列表返回格式:1.file_type|2.file_url|3.file_name|4.file_description
字段 | 必须 | 说明 |
---|---|---|
1.file_type | 否 | 文件类型,留空则根据 2.file_url 和 3.file_name 自行判断 |
2.file_url | 是 | 文件下载地址 |
3.file_name | 是 | 文件名 |
4.file_description | 否 | 描述 |
注意:描述和文件名都会自动修正html代码和非法字符 |
尾行返回格式:
0.continue_switch|1.inet_or_web|2.Cls_ChrCode|3.url_str[|4.dlpic_refer_url][|5.post_method]
当最后一行起始字段大于"0"时,继续外部脚本,其他内容遵循Function1:return_download_url规则
字段 | 必须 | 说明 |
---|---|---|
0.continue_switch | 是 | 0停止外部脚本;大于0继续外部脚本。如果为0可以不填填写后面的数据 |
1.inet_or_web | 是/否 | 同Function1规则 |
2.Cls_ChrCode | 是/否 | 同Function1规则 |
3.url_str | 是/否 | 同Function1规则 |
4.dlpic_refer_url | 否 | 如果填写,则替换Function1信息 |
5.post_method | 否 | 同Function1规则 |
Function3:return_albums_list
Function return_albums_list(ByVal html_str, ByVal url_str) 'html_str下载到的文本内容 'url_str本次下载使用到的url也就是return_download_url函数返回的参数,用于判断是否有多页面
End Function
返回格式: 0|23|http://comic.92wy.com/go/comicshow.aspx?id=1389&nameid=57|BLAME_第1卷|BLAME_第1卷 0|24|http://comic.92wy.com/go/comicshow.aspx?id=1390&nameid=57|BLAME_第2卷|BLAME_第2卷 . . . 0|inet|10,13|http://www.spymac.com/?u=24(|referce_url|post_method) 这行为最后一行(括号内是修改referce_url信息以及post_method信息,可有可无,不能带有回车符,回车符可用字符信息“&for_ox163_replace_vbcrlf&”代替) 当referce_url和post_method信息内容含有“|”分割线的时候,请务必把“|”替换为“&for_ox163_replace_vline&”
返回的连接为:是否有密码(0为没有)|图片数量(数字,不清楚留空)|单个相册连接|文件夹名(程序会自动判断文件名正确性,文件格式不为空以文件格式为准,两者都空以连接为准,不能含有“|”)|文件描述(可不填写,留空)
描述和文件名都会自动修正html代码和非法字符
最后一行 0(是否有多页面:0没有;大于0有) 如果为0可以不填填写后面的数据
--------------------------Function4----------------------------- Function return_password_rules(ByVal html_str, ByVal pass_word) 'html_str为return_download_url返回的需要传送密码的网页url,pass_word是你填写的密码
return_password_rules = "http://photo.163.com/photos/ugs_mov/49968705/|checking=1&pass=" & pass_word & "&submit=%D1%E9%D6%A4|0|请输入正确的访问密码" End Function 返回的形式如下: url | post方式内容,包括password |referer_str(比如留空或者"Content-Type: application/x-www-form-urlencoded")| 含有关键字为密码正确(1表示),有该关键字为密码错误(0表示) | 含有关键字(可含有“|”) 或者返回调用高级密码检验模式 return_ad_password_rules|inet|10,13|http://www.spymac.com/?u=24(|referce_url|post_method)(“return_ad_password_rules|”为固定开头,后面类似return_albums_list等函数返回结构,注意返回包含密码的post数据)
--------------------------Function5--------------------------- Function return_ad_password_rules(ByVal html_str, ByVal url_str, ByVal pass_word) 'html_str为return_password_rules返回的需要传送密码的网页数据url_str,url_str为相册url,pass_word是你填写的密码 return_ad_password_rules="password_correct" End Function 密码判断正确,返回“password_correct”(注意大小写) 需要再次传输页面数据,或者下载页面,返回格式为“1|inet|10,13|http://www.spymac.com/?u=24(|referce_url|post_method)”(“1|”为固定开头) 密码错误,返回与上面2个开头格式不同的任何文本,或者留空
javascript
函数名同vbscript Function return_download_url(url_str){ . . . return_download_url="0|inet|10,13|"+url_str; rentrn return_download_url; }
Function return_albums_list(html_str,url_str){ . . . rentrn return_albums_list; }
Function return_download_list(html_str,url_str){ . . . rentrn return_download_list; }