How to: Save the following code as Jb51.vbs
Then drag your saved on the local HTM page, drag and drop it on this VBS
Copy Code code as follows:
' Remarks: URL filter gadget
' Prevents errors from occurring
On Error Resume Next
' VBS code starts----------------------------------------------
Dim P,s,re
If wscript.arguments.count=0 Then
Msgbox "Please drag the webpage to the icon of this program!" ",," Tips "
Wscript.Quit
End If
For i= 0 to Wscript.arguments.count-1
P=wscript.arguments (i)
With CreateObject ("ADODB.stream")
. type=2
. charset= "GB2312"
. Open
. Loadfromfile=p
S=. ReadText
Set re =new REGEXP
Re. Pattern= "[a-z]+://[^" "<> () \s ']+"
Re. Global = True
If not re. Test (s) Then
Msgbox "This Web page file does not appear in the URL!" ",," Tips "
Wscript.Quit
End If
Set matches = Re. Execute (s)
S= ""
For the Match in matches
S=s & "<a href=" "& Match.value &" ">" & Match.value & "<p>"
Next
Re. Pattern= "&\w+;?| \w{5,} "
S=re. Replace (S, "")
. Position=0
. SetEOS
. WRITETEXT s
. SaveToFile P & "' s urls.html", 2
. Close
End With
Next
Msgbox "URL list has been generated! ",," succeeded "
' VBS code END----------------------------------------------