Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Login and fetch data from web using MSXML

Status
Not open for further replies.

patriciaxxx

Programmer
Jan 30, 2012
277
0
0
GB
I’m trying to login to 'myebay' page and print out the data.

I have tried all combinations of the following code but at best they just print out the login page and at worse I get the error ‘access is denied’

I’m using Access 2003.

Any help would be appreciated.

Code:
[COLOR=#204A87]'This requires a reference to the Microsoft HTML Object Library
Public Sub MyEbay()
Dim oHtml As HTMLDocument
Dim oElement As Object

With CreateObject("MSXML2.xmlHttp")
    '.Open "Post", "[URL unfurl="true"]https://signin.ebay.co.uk/ws/eBayISAPI.dll?SignIn",[/URL] False
    .Open "GET", "[URL unfurl="true"]http://my.ebay.co.uk/ws/eBayISAPI.dll?MyEbay&gbh=1",[/URL] False
    '.send "userid=123abc&pass=456def"
    .send
    Do Until .readyState = 4: DoEvents: Loop
    If .Status = 200 Then
        Set oHtml = New HTMLDocument
        oHtml.body.innerHTML = .responseText
        Debug.Print oHtml.body.outerText
    End If
End With

For Each oElement In oHtml.getElementsByTagName("div")
    If oElement.className = "mn" Then
        Debug.Print oElement.id
    End If
Next oElement

Set oHtml = Nothing

End Sub[/color]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top