Results 1 to 9 of 9

Thread: web page copy - get value from first and second page

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Mar 2005
    Posts
    2,580

    web page copy - get value from first and second page

    http://www.mutuissimo.it/iban-x.asp

    Based this url i need to get all value from the second page when i click, on:calcola cin e iban

    to test use:
    Codice ABI (es.: 03002)
    Codice CAB (es.: 05085)
    Conto corrente:01578

    how to?
    Last edited by Shaggy Hiker; Feb 24th, 2017 at 02:59 PM. Reason: Removed Resolved, per OP request.

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: web page copy - get value from first and second page

    after logging in try
    Code:
    Set abi = ie.document.getelementbyid("risultato").all("iban")
    MsgBox abi.Value
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Mar 2005
    Posts
    2,580

    Re: web page copy - get value from first and second page

    Quote Originally Posted by westconn1 View Post
    after logging in try
    Code:
    Set abi = ie.document.getelementbyid("risultato").all("iban")
    MsgBox abi.Value
    tks.
    but i dont know the way to put in the three box the related value of:

    Codice ABI (es.: 03002)
    Codice CAB (es.: 05085)
    Conto corrente:01578

    and press: calcola cin e iban
    Last edited by luca90; Aug 11th, 2014 at 03:01 PM.

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: web page copy - get value from first and second page

    i would have though you could have managed that part by now
    Code:
    Set ie = CreateObject("InternetExplorer.Application")
    ie.navigate "http://www.mutuissimo.it/iban-x.asp"
    do until ie.readyState = 4
    DoEvents 
    loop
    ie.Visible = True   ' optional
    Set f = ie.document.forms("iban")
    f.all("abi").Value = "01578"
    f.all("cab").Value = "01578"
    f.all("conto").Value = "01578"
    f.all("button1").Click
    Do
        Set abi = ie.document.getelementbyid("risultato").all("iban")
    Loop While abi Is Nothing
    MsgBox abi.Value
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Mar 2005
    Posts
    2,580

    Re: web page copy - get value from first and second page

    Quote Originally Posted by westconn1 View Post
    i would have though you could have managed that part by now
    Code:
    Set ie = CreateObject("InternetExplorer.Application")
    ie.navigate "http://www.mutuissimo.it/iban-x.asp"
    do until ie.readyState = 4
    DoEvents 
    loop
    ie.Visible = True   ' optional
    Set f = ie.document.forms("iban")
    f.all("abi").Value = "01578"
    f.all("cab").Value = "01578"
    f.all("conto").Value = "01578"
    f.all("button1").Click
    Do
        Set abi = ie.document.getelementbyid("risultato").all("iban")
    Loop While abi Is Nothing
    MsgBox abi.Value
    hi West the code work perfect! tks for tath.
    But i need to get also the value with the arrow-
    for test use the value circled in image attached.
    Tks.
    Last edited by luca90; Aug 12th, 2014 at 10:36 AM.

  6. #6
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: web page copy - get value from first and second page

    try adding like
    Code:
    Do
        Set abi = ie.document.getelementbyid("risultato").all("iban")
    Loop While abi Is Nothing
    'add here
    Set t = ie.document.all("table3")
    MsgBox abi.Value & vbNewLine & t.all(3).innertext & vbNewLine & t.all(6).innertext & vbNewLine & t.all(9).innertext
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Mar 2005
    Posts
    2,580

    Re: web page copy - get value from first and second page

    Quote Originally Posted by westconn1 View Post
    try adding like
    Code:
    Do
        Set abi = ie.document.getelementbyid("risultato").all("iban")
    Loop While abi Is Nothing
    'add here
    Set t = ie.document.all("table3")
    MsgBox abi.Value & vbNewLine & t.all(3).innertext & vbNewLine & t.all(6).innertext & vbNewLine & t.all(9).innertext
    Hi West! tks! the code work perfect!

  8. #8

    Thread Starter
    PowerPoster
    Join Date
    Mar 2005
    Posts
    2,580

    Re: web page copy - get value from first and second page

    Quote Originally Posted by westconn1 View Post
    try adding like
    Code:
    Do
        Set abi = ie.document.getelementbyid("risultato").all("iban")
    Loop While abi Is Nothing
    'add here
    Set t = ie.document.all("table3")
    MsgBox abi.Value & vbNewLine & t.all(3).innertext & vbNewLine & t.all(6).innertext & vbNewLine & t.all(9).innertext

    HI west sorry if i reply on old post...
    but now the code return : error runtime 13
    perphs the html page is changed....
    Last edited by luca90; Feb 24th, 2017 at 06:14 AM.

  9. #9
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: web page copy - get value from first and second page

    Do
    Set abi = ie.document.getelementbyid("risultato").all("iban")
    Loop While abi Is Nothing
    IE has changed, in later versions if IE, it will cause an error if the element is not yet loaded, i have had to find some alternative

    i have had to rewrite some scrapers to work with later versions, as people have upgraded to w10 or later versions of IE
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width