• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to build a web crawler

ThrottleWorks

Excel Ninja
Hi,

I am trying to build a web crawler for learning process.Have never done it before.

I am reading various Google links for learning purpose. Will try to put my WIP code here.

Meanwhile can anyone here please help me in this.
Please refer attached file for more details.

How do put values in 'Go' box.

Also, I am trying this on IE 11.

Code:
Sub FirstWebCrawler()

    Dim IEexp As Object
  
    'This line creates new instance of IE
    Set IEexp = CreateObject("InternetExplorer.Application")
  
    IEexp.Visible = True
  
    'This link will open URL mentioned in cell B2
    Range("B1").Select
    Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
End Sub
 

Attachments

  • Crawler.xlsb
    48.4 KB · Views: 8
Last edited:
Hi !

As a starter …​
Code:
Sub Demo1()
With CreateObject("WinHttp.WinHttpRequest.5.1")
    .Open "GET", "http://www.moneycontrol.com/india/stockpricequote/auto-2-3-wheelers/bajajauto/BA10", False
    .setRequestHeader "DNT", "1"
     On Error Resume Next
    .send
     If Err.Number Then Beep: Exit Sub
     On Error GoTo 0
 If .Status = 200 Then T$ = .responseText Else Beep: Exit Sub
End With
With CreateObject("htmlfile")
    .body.innerHTML = T
      [C4:I4].Value = Array(.all.Bse_Prc_tick_div.innerText, Val(.all.b_changetext.innerText), _
                             Split(Split(.all.b_changetext.innerText, "(")(1), "%")(0), _
                            .all.bse_volume.innerText, .all.b_prevclose.innerText, _
                            .all.b_open.innerText, Val(.all.b_offerprice_qty.innerText))
End With
End Sub
Do you like it ? So thanks to click on bottom right Like !
 
Hi @Marc L sir, really sorry for late reply. Somehow I missed this. Just saw your post. Please give me some to revert. Thanks for the help.

Have a nice day ahead. :)
 
Back
Top