采集迅雷官网代码:
------------------------
如电影“宝贝计划”的查看页面如下:
http://wstatic.xunlei.com/web/content.htm?cid=388EB545E0D78A33D8428A5CC2811A78E94114B7
而内容介绍与迅雷下载地址却藏在下面这个页面:http://rstatic.xunlei.com/resource_data/56/142/388EB545E0D78A33D8428A5CC2811A78E94114B7.htm
(用浏览器打开是空白的,请查看该页的源代码,内容就在源代码里)
迅雷官网为了防采集在URL中加了2个变量(这里是56、142),下面代码就为你算出该变量内容。
'------------------------------------------------------------
Public Function Dec(Hex)
Dim i
Dim B
For i = 1 To Len(Hex)
Select Case Mid(Hex, Len(Hex) - i + 1, 1)
Case "0": B = B + 16 ^ (i - 1) * 0
Case "1": B = B + 16 ^ (i - 1) * 1
Case "2": B = B + 16 ^ (i - 1) * 2
Case "3": B = B + 16 ^ (i - 1) * 3
Case "4": B = B + 16 ^ (i - 1) * 4
Case "5": B = B + 16 ^ (i - 1) * 5
Case "6": B = B + 16 ^ (i - 1) * 6
Case "7": B = B + 16 ^ (i - 1) * 7
Case "8": B = B + 16 ^ (i - 1) * 8
Case "9": B = B + 16 ^ (i - 1) * 9
Case "A": B = B + 16 ^ (i - 1) * 10
Case "B": B = B + 16 ^ (i - 1) * 11
Case "C": B = B + 16 ^ (i - 1) * 12
Case "D": B = B + 16 ^ (i - 1) * 13
Case "E": B = B + 16 ^ (i - 1) * 14
Case "F": B = B + 16 ^ (i - 1) * 15
End Select
Next
Dec = B
End Function
cid="388EB545E0D78A33D8428A5CC2811A78E94114B7" '该CID只是电影宝贝计划的CID,其他电影查看其URL
iParentDir = Dec(left(cid,2))
iChildDir = Dec(mid(cid,3,2))
Url="http://rstatic.xunlei.com/resource_data/"&iParentDir&"/"&iChildDir&"/"&cid&".htm"
'------------------------------------------------
得到的 Url 就是藏着电影内容与下载地址的网页地址,然后你用采集程序批量采集即可。