.net - Webclient results with default parameter value -
i trying parse webpage through web client using following code.
private sub button1_click(sender object, e eventargs) handles button1.click dim lnk string = "http://www.therapy-directory.org.uk/search.php?search=central+london&distance=100&uqs=717425" dim wb new webclient() wb.headers.add("content-type", "application/json") addhandler wb.downloadstringcompleted, addressof gettotal wb.downloadstringasync(new uri(lnk)) end sub private sub gettotal(sender object, e downloadstringcompletedeventargs) if e.error nothing dim str string = e.result dim doc htmlagilitypack.htmldocument = new htmlagilitypack.htmldocument() doc.loadhtml(str) on error resume next dim tot htmlagilitypack.htmlnode = doc.documentnode.selectnodes("//div[contains(@id,'search-results')]//h3[contains(@class,'search-title')]")(0) '("//div[contains(@id,'search-results')]//span[contains(@class,'pcolour')]")(0) on error goto 0 if not tot nothing msgbox(tot.innertext) end if else msgbox(e.error.message) end if end sub
the result got code "380 results within 6 miles"..but,i have set parameter value of 100 mile. can view in webbrowser there around 1600 within 100 miles.
it seems, showing value default value miles
Comments
Post a Comment