Advertisement
Advertisement
| 01.24.2008 at 03:26AM PST, ID: 23107297 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: |
'=================
strOutputFile = "Results.csv"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objHTTP = CreateObject("Msxml2.XMLHTTP")
strURL = "http://irishjobs.ie/showresults.aspx?IsProvince=1&MatchPerc=40&Location=&Ranking=&Roles=&Recruiter=Both&Category=9&cboLocation=-1&KEYWORDS=CAD+Technician&I7.x=16&I7.y=8"
objHTTP.open "GET", strURL, False
objHTTP.send
strData = objHTTP.responseText
objHTTP.Open "GET", strURL, FALSE
objHTTP.Send
strPageText = objHTTP.responseText
arrText = Split(strPageText, "Big Fish Recruitment")
intDesignEngPg1Count = UBound(arrText)
' This code assumes strData holds the string returned from the listings page
Dim tmpBuffer
Dim strURL
Dim tmpURL
tmpBuffer = Replace(Replace(strData, VbCrLf, ""), vbTab, "") ' Copy data over to a temporary buffer that we can play With
Redim strURL(0) ' Initialize a blank array
' This loop will parse through the listing page's HTML and return all URLs to a job description page
' We will parse out company name and contact info from the job description page
Do While tmpBuffer <> ""
If InStr(1, tmpBuffer, "/JobDesc.asp?") Then
' First find the beginning of the cell with the URL in it
tmpURL = Mid(tmpBuffer, InStrRev(tmpBuffer, "<td", InStr(1, tmpBuffer, "/JobDesc.asp?")))
' Find the end of the cell with the URL in it
tmpURL = Mid(tmpURL, 1, InStr(1, tmpURL, "</td>") - 1)
' Test if the company name is in that cell
If InStr(1, tmpURL, "Big Fish Recruitment") > 0 Then
' First find the beginning of the link URL
tmpURL = Mid(tmpBuffer, InStr(1, tmpBuffer, "/JobDesc.asp?"))
' Find the end of the URL
tmpURL = Mid(tmpURL, 1, InStr(1, tmpURL, Chr(34)) - 1)
' Copy the URL into the upper bound of the array and resize the array
strURL(UBound(strURL)) = "http://irishjobs.ie" & Replace(tmpURL, "&", "&")
Redim Preserve strURL(UBound(strURL) + 1)
End If
' Next loop, search for the next URL (not the same one!)
tmpBuffer = Mid(tmpBuffer, InStr(1, tmpBuffer, "/JobDesc.asp?") + 1)
Else
' Erase the buffer to exit the loop
tmpBuffer = ""
End If
Loop
If UBound(strURL) = 0 Then
MsgBox "Could not find ""/JobDesc.asp?"" in the page text. Exiting script."
WScript.Quit
' No URLs parsed?!
Else
' Trim off the last (blank) array entry
Redim Preserve strURL(UBound(strURL) - 1)
End If
' At this point strURL() is an array containing URLs To
'WScript.Echo Join(strURL, VbCrLf)
' SECOND PART TO GET EACH URL PAGE
Set objContacts = CreateObject("Scripting.Dictionary")
For Each strPage In strURL
Set objHTTP = CreateObject("Msxml2.XMLHTTP")
objHTTP.open "GET", strPage, False
objHTTP.send
strData = objHTTP.responseText
'WScript.Echo strData
Dim strContact
If InStr(1, strData, "<div align=" & Chr(34) & "left" & Chr(34) & " class=" & Chr(34) & "heading" & Chr(34) & ">Contact:") Then
strContact = Mid(strData, InStr(1, strData, "<div align=" & Chr(34) & "left" & Chr(34) & " class=" & Chr(34) & "heading" & Chr(34) & ">Contact:"))
strContact = Mid(strContact, InStr(1, strContact, "<div align=" & Chr(34) & "left" & Chr(34) & " class=" & Chr(34) & "text" & Chr(34) & ">") + 31)
strContact = Mid(strContact, 1, InStr(1, strContact, "</div>") - 1)
'MsgBox "Contact " & strContact & " from Big Fish Recruitment"
If objContacts.Exists(strContact) Then
objContacts(strContact) = objContacts(strContact) + 1
Else
objContacts.Add strContact, 1
End If
Else
'MsgBox "Could not find the contact's name!"
End If
'If strCompany <> "" And strContact <> "" Then MsgBox "Contact " & strContact & " from Big Fish Recruitment"
Next
strResults = """Contact Name"",""Count"""
For Each strContact In objContacts
'WScript.Echo strExtension & " - " & objFileTypes(strExtension)
strResults = strResults & VbCrLf & """" & strContact & """,""" & objContacts(strContact) & """"
Next
If objcontacts("Niall Winter") =0 then
Msgbox "Niall has 0 and BigFish has "&intDesignEngPg1Count /2
Else
Msgbox "Niall has "&objcontacts("Niall Winter")&" and BigFish has "&intDesignEngPg1Count /2
End if
|