火车采集器/手动链接格式设置
来自站长百科
手动链接格式是将需要的网址用参数来获得并组合成需要的网址。这个好处是处理网址那块有规律的网址很好处理,但要是没规律,和周围的一样的话,就不好处理了。
以http://www.admin5.com/browse/9/index.shtml 为例. 看图里的设置:
这样设置就可以获得真实网址了,这个网址是从摘要那块获得的,那一块的代码都是一个样式,所以可以。
看上图的话,会发现在参数那里有个缩略图,因为有的文章是将缩略图放在列表里的。
现在举个例子。看这个http://www.llsh.net/dz/,这个是电影的,有小图的,看一下怎么获得这个图片。
注意,这里是同时获得网址和缩略图的。
因为网址和缩略图那块的样子就是下边的,是有规律的,所以可以获得网址
如果遇到那些用脚本做栏目列表时怎么办呢?用自动识别是不行的了。这时,该使用手动设置链接格式这个功能起作用了,这也是针对脚本类网址最好的解决办法。
下边以腾讯Flash频道_作品列表为例来讲一下http://flash.qq.com/classlist/listwork_1000130000_1.shtml
用自动获取网址是得不到什么地址的.
仔细分析源码后就会发现,这个是这个样子的网址http://flash.qq.com/cgi-bin/viewwork?id=727749,只有最后的数字是不同的,而这数字就包含在脚本里边,看一下源码:
<script language="javascript"> var WorkList = new Array (new Array("727749" "515691264" "小虫" "奥运英雄金牌榜" "http://data1.flash.qq.com/0/0/727/749-1215631240.jpg" "20278" "110" "1" "0" "0") new Array("720075" "276382390" "石头猫" "悟空先生" "http://data1.flash.qq.com/0/0/720/75-1214305756.gif" "16419" "167" "1" "0" "0") new Array("717047" "429383035" "`" "追捕" "http://data1.flash.qq.com/0/0/717/47-1213796675.jpg" "8982" "97" "1" "0" "0") new Array("704794" "401320741" "饭饭㊣" "靓靓超人之决战喇嘛" "http://data1.flash.qq.com/0/0/704/794-1211878682.jpg" "4386" "57" "0" "0" "0") new Array("696019" "751352265" "庐山制作" "功夫" "http://data1.flash.qq.com/0/0/696/19-1210555821.jpg" "16276" "159" "1" "0" "0") new Array("692447" "401320741" "饭饭㊣" "黑客红蜘蛛" "http://data1.flash.qq.com/0/0/692/447-1209977138.jpg" "26868" "87" "1" "0" "0") new Array("675527" "351864717" "闪客动漫堂" "FLASH也奥运" "http://data1.flash.qq.com/0/0/675/527-1207619068.gif" "21260" "204" "1" "0" "0") new Array("668835" "752822778" "A流浪猫动画" "太阳" "http://data1.flash.qq.com/0/0/668/835-1206586517.gif" "3136" "6" "0" "0" "0") new Array("668665" "707094092" "大熊宁宁" "火柴头玩花式篮球" "http://data1.flash.qq.com/0/0/668/665-1206589560.gif" "4095" "22" "0" "0" "0") new Array("663480" "81849901" "我自鬼来也" "鬼斗BOS-Part1" "http://data1.flash.qq.com/0/0/663/480-1205903695.jpg" "7713" "22" "1" "0" "0") new Array("663379" "24786829" "内野外" "火柴头玩花式篮球" "http://data1.flash.qq.com/0/0/663/379-1205891111.gif" "15944" "31" "1" "0" "0") new Array("663377" "24786829" "内野外" "铭三国" "http://data1.flash.qq.com/0/0/663/377-1205890883.gif" "7256" "9" "0" "0" "0") new Array("661538" "24786829" "内野外" "杀手 广告片" "http://data1.flash.qq.com/0/0/661/538-1205638699.gif" "5371" "3" "1" "0" "0") new Array("655066" "752822778" "A流浪猫动画" "apple force cartoon" "http://data1.flash.qq.com/0/0/655/66-1204683513.gif" "5124" "78" "1" "0" "0") new Array("650967" "282417873" "Toice" "拳皇之黑夜任务2下集" "http://data1.flash.qq.com/0/0/650/967-1204252390.gif" "80180" "186" "1" "0" "0") new Array("645923" "56616462" "电动画" "果酱军团—秘密实验室" "http://data1.flash.qq.com/0/0/645/923-1203674703.gif" "23738" "462" "1" "0" "0") new Array("643579" "406391994" "命运冷笑" "三侠五义之锦玉良缘" "http://data1.flash.qq.com/0/0/643/579-1203474373.jpg" "7887" "12" "1" "0" "0") new Array("643259" "282417873" "Toice" "拳皇之黑夜任务" "http://data1.flash.qq.com/0/0/643/259-1203477735.jpg" "23889" "92" "1" "0" "0") new Array("642502" "752822778" "A流浪猫动画" "BLACKMAMBA" "http://data1.flash.qq.com/0/0/642/502-1203347374.gif" "3583" "100" "1" "0" "0") new Array("624730" "56616462" "电动画" "惠普-红包飞" "http://data1.flash.qq.com/0/0/624/730-1201931430.gif" "15861" "374" "1" "0" "0") new Array("620200" "86472322" "妙动数码" "妙动狗过年 猫狗大战" "http://data1.flash.qq.com/0/0/620/200-1201717730.gif" "6020" "25" "0" "0" "0") new Array("619916" "332015746" "梁火龙" "踢馆式讨红包" "http://data1.flash.qq.com/0/0/619/916-1201702663.gif" "5955" "7" "0" "0" "0") new Array("597789" "798565629" "炎の漩濄" "The Miss World" "http://data1.flash.qq.com/0/0/597/789-1200880000.gif" "9105" "264" "1" "0" "0") new Array("568681" "32211633" "神创动漫" "AZONE猎人" "http://data1.flash.qq.com/0/0/568/681-1199877523.gif" "50732" "652" "1" "0" "0") new Array("543478" "403102962" "lysaaaaa" "西游记未说故事" "http://data1.flash.qq.com/0/0/543/478-1199235218.gif" "7062" "8" "0" "0" "0") new Array("528962" "304505715" "jikali" "圣诞节的礼物" "http://data1.flash.qq.com/0/0/528/962-1198631233.gif" "9026" "417" "1" "0" "0") new Array("522378" "562390841" "lyl88" "天下无贼" "http://data1.flash.qq.com/0/0/522/378-1198459143.gif" "12472" "208" "1" "0" "0") new Array("510191" "24786829" "内野外" "血战长坂" "http://data1.flash.qq.com/0/0/510/191-1198027652.gif" "29703" "203" "0" "0" "0") new Array("492883" "279583073" "奇利动画" "舞者vs武者" "http://data1.flash.qq.com/0/0/492/883-1197600642.gif" "19849" "505" "1" "0" "0") new Array("477711" "616553383" "尘埃之外" "乱世豪侠传" "http://data1.flash.qq.com/0/0/477/711-1197174316.gif" "7359" "222" "0" "0" "0") new Array("476248" "24786829" "内野外" "超智能足球 样片" "http://data1.flash.qq.com/0/0/476/248-1196993623.gif" "6816" "342" "1" "0" "0") new Array("467950" "694247688" "comtech" "曹操来袭击" "http://data1.flash.qq.com/0/0/467/950-1196730978.gif" "50692" "473" "1" "0" "0") new Array("453316" "24786829" "内野外" "stupid man 3" "http://data1.flash.qq.com/0/0/453/316-1196216975.gif" "11991" "245" "0" "0" "0") new Array("450816" "155383007" "星辰动画" "龙宫借宝" "http://data1.flash.qq.com/0/0/450/816-1196105423.gif" "30767" "1220" "1" "0" "0") new Array("446293" "155383007" "星辰动画" "三打白骨精" "http://data1.flash.qq.com/0/0/446/293-1195964863.gif" "72777" "2048" "1" "0" "0") new Array("431492" "369384067" "IZSW" "心之云" "http://data1.flash.qq.com/0/0/431/492-1195522707.gif" "9141" "467" "1" "0" "0") )
注意:new Array("431492",后边就有要的网址,还有缩略图,可以这样写规则:
这样就可以了,看一下效果