<Script Language="VBScript">
Dim IStr,StrSave,StrCookie
Dim CAIType
Dim MusicBody,MusicNameArr,MusicURLArr,MusicCount,MusicPtr,MusicName,MusicPlayer,MusicURL,MusicSave
Set IStr = CreateObject("")
'msgbox
= "#FFFFFF"
= "#FFFFFF"
= "#E0E0E0"
'=============================================================================================================================================================
'FDown event module starts
'=============================================================================================================================================================
'The download library notifies the download status through this function
Private Sub FDown_Status(ByVal lIndex, ByVal lStatus, ByVal bstrStatusParam)
On Error Resume Next
If blnDStop = True Then
Exit Sub
End If
("DownForm").innerText =
If = dtToFile And <> "" And <> "" Then
("DownTo").innerText = & "\" &
Else
("DownTo").innerText = "Crawl data..."
End If
Dim strMsg
strMsg = "Thread" & lIndex + 1 & ":"
If lStatus = 0 Then
strMsg = strMsg & "Resolve the domain name"
ElseIf lStatus = 1 Then
strMsg = strMsg & "Get IP Address"
ElseIf lStatus = 2 Then
strMsg = strMsg & "Connect the Server"
ElseIf lStatus = 3 Then
strMsg = strMsg & "Connected to the server successfully"
ElseIf lStatus = 4 Then
strMsg = strMsg & "Redirect to"
ElseIf lStatus = 5 Then
strMsg = strMsg & "Start to receive data"
ElseIf lStatus = 6 Then
strMsg = strMsg & "Download end"
End If
strMsg = strMsg & bstrStatusParam & vbCrLf
("DownState").innerText = strMsg
End Sub
'Download library notifies the file download progress through this event
Private Sub FDown_Progress(ByVal dbFileSize, ByVal dbFinished, ByVal dbSpeed)
On Error Resume Next
If blnDStop = True Then
Exit Sub
End If
Dim BFile
Dim BRead
Dim BShare
Dim BSpeed
BFile = dbFileSize
BRead = dbFinished
BShare = dbFinished / (dbFileSize / 100)
BSpeed = dbSpeed
If IsNumeric(dbFinished) = True And IsNumeric(dbFileSize) = True Then
BFile = dbFileSize
BRead = dbFinished
BShare = dbFinished / (dbFileSize / 100)
(BRead/BFile)
("DownLoading").innerText = BRead & " of " & BFile & " transferred (" & Round(BShare, 2) & "%)"
End If
If IsNumeric(dbSpeed) = True Then
BSpeed = dbSpeed
("DownSpeed").innerText = "Throughput " & BSpeed & " /s"
End If
End Sub
'The download library notifies the end of the download process through this event
Private Sub FDown_DownloadEnd(ByVal bSuccess)
On Error Resume Next
Select Case CAIType
Case "C1"
StrBody =
oSpecialName = (StrBody,"Album Name:","</li>")
("SpecialName").value = oSpecialName
oSinGer = (StrBody,"Singer name:","</li>")
("SinGer").value = oSinGer
oGongSi = (StrBody,"Disc:","</li>")
("GongSi").value = oGongSi
oYuYan = (StrBody,"Album language:","</li>")
("YuYan").value = oYuYan
oTimes= (StrBody,"issued time:","</li>")
("Times").value = oTimes
oPIC = (StrBody,"<div class=""rightcolumn""><div id=""albuminfo""><img src=""",""">")
("PIC").value = oPIC
oremark = (StrBody,"<h2>album introduction</h2><p>","</p>")
("remark").value = oremark
StrSave = ("SavePath").value & "\" & oSinGer & "\" & oSpecialName
CAIType = "C2"
Download_File 0, oPIC, StrSave & "\", True, ("SpecialURL").value, StrCookie
MusicBody = (StrBody,"<form name=form2 target=myplay action=../>","<input name=""chkall2"" onclick=CheckAll() type=""button"" value=""Select all"" //>")
MusicNameArr = (MusicBody,"<a href=""../?musicname=",""" target=_blank>",0,True)
MusicNameArr = Split(MusicNameArr,"§")
MusicURLArr = (MusicBody,"<input name=""checked"" type=""checkbox"" value=""",""" />",0,True)
MusicURLArr = Split(MusicURLArr,"§")
MusicCount = UBound(MusicURLArr)
CAIType = "C3"
MusicPtr = 0
GetMusic
Case "C3"
StrBody =
MusicURL = "http://wma7./20060312/" & (StrBody,"(""<PARAM NAME=\""URL\"" VALUE='""+url+""/","'>"")")
MusicSave = StrSave & "\" & MusicPtr+1 & (MusicURL)
CAIType = ""
StrCookie = Download_Text(0,"http://hi./", "gb2312", True, MusicPlayer, "")
StrCookie =
StrCookie = (StrCookie,"=""","; domain=hi.;")
'MsgBox StrCookie
CAIType = "C4"
Download_File 0, MusicURL, MusicSave, False, ("SpecialURL").value, StrCookie
Case "C4"
CAIType = "C3"
MusicPtr = MusicPtr + 1
GetMusic
End Select
If blnDStop = True Then
Exit Sub
End If
End Sub
Previous page1234Next pageRead the full text