Sub JobDone (Job As HttpJob)
Dim TextReader1 As TextReader
TextReader1.Initialize(Job.GetInputStream)
Dim pattern, class As String
class = "href"
pattern = "src=\q([^q]+)\q".Replace("q", QUOTE)
Dim line As String
line = TextReader1.ReadLine
Do While line <> Null
If line.IndexOf(class) > -1 Then
Dim m As Matcher
m = Regex.Matcher(pattern, line)
Do While m.Find <> False
Dim ImageJob As HttpJob
ImageJob.Initialize("ImageJob", Me)
ImageJob.Download(m.Group(1))
Loop
End If
line = TextReader1.ReadLine
Loop
TextReader1.Close
End Sub