Web Scraping

mikeymay

Well-known Member
Joined
Jan 17, 2006
Messages
1,600
Office Version
  1. 365
Platform
  1. Windows
I have been successful in logging into a website and adding data to return a model window showing result based on the entries made dynamically via the VBA.

The website is Login to your account - QuickEmailVerification

The requirements is to enter a single email address to return information about the email address and from the modal window, scrape the result for SafeToSend and Accept all domain and then close the modal window.

I am able to login, enter an email address and click the 'Verify Email Address' button but this is where I have hit a brick wall.

The code I have so far is below
VBA Code:
Sub WebData()

Dim appIE As InternetExplorer

Dim docIE As HTMLDocument
Dim docIEResult As HTMLDocument

Dim objUserName As IHTMLInputElement
Dim objPassword As IHTMLInputElement

Dim objVerifyEmail As Object

Dim objLogin As Object

Set appIE = New InternetExplorer

appIE.Visible = False
appIE.Visible = True

appIE.Navigate ("https://quickemailverification.com/login")

Do While appIE.Busy Or appIE.ReadyState <> READYSTATE_COMPLETE
   DoEvents
Loop

Application.Wait Now + TimeValue("00:00:03")

Set docIE = appIE.Document

Set objUserName = docIE.getElementById("Email")
Set objPassword = docIE.getElementById("Password")
   
objUserName.Value = [I]my login name[/I]
objPassword.Value = [I]my login password[/I]

For Each objLogin In docIE.getElementsByClassName("blue_btn btn-block")
   If objLogin.ID = "login" Then
      
      objLogin.Click

      Do While appIE.Busy Or appIE.ReadyState <> READYSTATE_COMPLETE
         DoEvents
      Loop
      
      DoEvents
      
      Application.Wait Now + TimeValue("00:00:03")
      
      Exit For
      Else
   End If
Next

Set objLogin = Nothing

Set docIE = appIE.Document

Set objUserName = docIE.getElementById("Email")

objUserName.Value = [I]Email address to check[/I]
  
For Each objLogin In docIE.getElementsByClassName("btn btn-primary btn-lg btn-block")
   If objLogin.ID = "verify" Then
      objLogin.Click
      Else
   End If
      
   Do While appIE.Busy Or appIE.ReadyState <> READYSTATE_COMPLETE
      DoEvents
   Loop
   
   DoEvents
   
   Application.Wait Now + TimeValue("00:00:03")

  Exit For
Next

End Sub
Any advice on what I have so far (I am very new to web scraping) and how to proceed would be useful.

TIA
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,214,847
Messages
6,121,911
Members
449,054
Latest member
luca142

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top