0

I use vba for scraping our web site. I did it using InternetExplorer object. Then I'll tried using winhhtp. I'm able to to the same but not take data from this page. I'm able to generate using .stream a file in html that have all the code in the snippet, but using ohtml.body.innerhtml=http.responsetext I'm able to scrape not the full page but only until 0002 in the tbody ....

This is the code I used for:

http.Open "GET", MyURL, False
    http.send
Do While http.Status <> 200
DoEvents
Loop

    If http.Status = 200 Then
Set oStream = CreateObject("ADODB.Stream")
   oStream.Open
oStream.Type = 1
oStream.Write http.responseBody
File1 = "E:\testo2.htm"
 oStream.SaveToFile File1, 2
  oStream.Close
  End If
  


  oHtml.body.innerHTML = http.responseText


       Dim TB, TR, TD As Object
 Dim tbnum, r, d As Integer
      For Each TB In oHtml.getElementsByTagName("TABLE")            '21
                        tbnum = tbnum + 1
                             For Each TR In TB.Rows      '22
                                    r = r + 1

                                    For Each TD In TR.Cells           '23
                                            d = d + 1
     Select Case TD.innerText        'impostiamo le condizioni da   verificare        sull'espressione "Valore"

   Case "CASELLA FIRMA CAAF/PROFESSIONISTA "  'se Valore ?
   sh21.Range("ac" & soggetto) = "SI" 'si restituisce questa istruzione
    Case "Codice Fiscale Responsabile C.A.F."
    If TD.NextSibling.outerText <> "- " Then
    sh21.Range("ad" & soggetto) = TD.NextSibling.outerText
    End If
  Case "Codice Fiscale C.A.F."
    If TD.NextSibling.outerText <> "- " Then
    sh21.Range("ae" & soggetto) = TD.NextSibling.outerText
    End If
    Case "Codice fiscale professionista "
    If TD.NextSibling.outerText <> "- " Then
    sh21.Range("af" & soggetto) = TD.NextSibling.outerText
    End If
  End Select
                                    Next      '23
                            d = 0
                              Next      '22
                    r = 0
                      Next          '2
                          

    


Next

The error i think is that responsetext is not full load or the size is over even if the testo2.htm containg all the html code....maybe problem with java script?

Here is the full html:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">


<HTML lang="it">

<HEAD>

  <META name="GENERATOR" content="IBM Software Development Platform">
  <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  <META http-equiv="Cache-Control" content="no-cache,no-store,must-revalidate">
  <META http-equiv="Expires" content="-1">
  <META http-equiv="Pragma" content="no-cache">
  <!--  <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>-->
  <!--  includo CSS di Base e Cobra -->
  <LINK REL=STYLESHEET TYPE="text/css" HREF="/CobraStatic/consultazioni/css/CobraUffici.css">

  <LINK REL=STYLESHEET TYPE="text/css" HREF="/CobraStatic/home/css/CobraHome.css">



  <!--  includo il JS di Servizio dinamicamente -->
  <script type="text/javascript" src="/CobraStatic/home/js/jquery.js"></script>

  <script type="text/javascript" src="/CobraStatic/home/js/toggle.js"></script>



  <TITLE>
    Ser.P.I.Co. - Richiesta di RIMBORSO IVA TR

  </TITLE>

</HEAD>

<BODY>
  <div class="contenitore">



    <div id="testata">
      <div id="testata_fondo_i">
        <div id="testata_sx">
          <a href="http://www.MAMMA.COM.it/" title="Vai al sito dell'Mamma delle mamme [Link a sito esterno]" target="_agenziaWindow"><img src="/CobraStatic/home/immagini/logo.gif" alt="Sito dell'Mamma delle mamme" border="0"></a>
        </div>
        <div id="testata_centro_i"></div>
        <div id="testata_dx_i"></div>
      </div>
      <p id="titolo_servizio">
        <!--  -->
      </p>
    </div>














    <LINK REL=STYLESHEET TYPE="text/css" HREF="/CobraStatic/home/css/menu_dropDown.css">
    <!--[If lt IE 9]>
     <LINK REL=STYLESHEET TYPE="text/css" HREF="/CobraStatic/home/css/menu_dropDown_IElt9.css">
<![endif]-->
    <!--[If IE 9]>
     <LINK REL=STYLESHEET TYPE="text/css" HREF="/CobraStatic/home/css/menu_dropDown_IE9.css">
<![endif]-->
    <div class="menu_orizzontale">
      <div class="menu">
        <ul class="blockeasing">
          <li class="main">
            <a href="/CobraUffici/RedirectServizi"> Home SERVIZI</a>
          </li>
          <li class="main">
            <a href="#">Consultazioni</a>
            <ul class="subnav0">
              <li><a href="#"><u>Informazioni Generalizzate</u></a></li>
              <li><a href="/CollegamentoTerritorioWeb/TerritorioServlet">Catasto e Conservatorie</a></li>
            </ul>
          </li>
          <li class="main">
            <a href="#">Consultazioni Dati non A.T.</a>
            <ul class="subnav1">
              <li><a href="/CccccConsultazioneWeb/CCCCCServlet">Camera di TRADE</a></li>
              <li><a href="/ContoEUROPE/EUROPEServlet">Estratto Conto AdER</a></li>
            </ul>
          </li>
        </ul>
      </div>
    </div>
    <div class="esci">
      <a href="/CobraUffici/CloseSession"> Esci</a>
    </div>
    <div class="user">
      Utente connesso <i><b>52tttt</b></i>
    </div>
    <script type="text/javascript" src="/CobraStatic/home/js/jquery-ui-1.8.24.custom.min.js"></script>
    <script type="text/javascript">
      $(document).ready(function() {
        $("ul.blockeasing li.main").mouseover(function() {
          $(this).find('.subnav0').stop().animate({
            height: '59px',
            opacity: '1'
          }, {
            queue: false,
            duration: 1500,
            easing: 'easeOutElastic'
          })
          $(this).find('.subnav1').stop().animate({
            height: '59px',
            opacity: '1'
          }, {
            queue: false,
            duration: 1500,
            easing: 'easeOutElastic'
          })
          $(this).find('.subnav2').stop().animate({
            height: '11px',
            opacity: '1'
          }, {
            queue: false,
            duration: 1500,
            easing: 'easeOutElastic'
          })
        });
        $("ul.blockeasing li.main").mouseout(function() {
          $(this).find('.subnav0').stop().animate({
            height: '0px',
            opacity: '0'
          }, {
            queue: false,
            duration: 1600,
            easing: 'easeOutElastic'
          })
          $(this).find('.subnav1').stop().animate({
            height: '0px',
            opacity: '0'
          }, {
            queue: false,
            duration: 1600,
            easing: 'easeOutElastic'
          })
          $(this).find('.subnav2').stop().animate({
            height: '0px',
            opacity: '0'
          }, {
            queue: false,
            duration: 1600,
            easing: 'easeOutElastic'
          })
        });
        $("ul.blockeasing li").hover(function() {
            $(this).stop().animate({
              backgroundColor: "#F7F7F7"
            }, 600);
          },
          function() {
            $(this).stop().animate({
              backgroundColor: "#FDAF7B"
            }, 600);
          });
      });
    </script>


    <div class="menu_orizzontale_servizio">
      <TABLE width="100%" align="left">
        <tr>
          <td class="utente">
            &nbsp;&nbsp;Sei in: <i><b>Consultazioni - Informazioni Generalizzate</b></i>
          </td>

          <td class="barra">
          </td>
          <td class="barra">
          </td>
          <td class="barra">
          </td>


          <td class="barra">
          </td>
          <td class="barra">

            <a href="/CobraUffici/CobraWebServlet?Ric=indiv">Ricerca</a>

          </td>
          <td class="barra">
            <a href="/CobraUffici/CobraGuidaServlet?Ric=IVR" target="_guidaWindow">Guida</a>
          </td>

          <td class="barra">


            <a href="/CobraUffici/CobraWebServlet?Ric=News">News</a>
          </td>






        </tr>
      </TABLE>
    </div>
    <div class="data">Data:<b>07/12/2018 12:24:36</b></div>










    <div class="centrato" align="center">

      <div class="divisore_orizz">
        <table cellpadding="3" summary="La tabella riporta gli estremi identificativi del contribuente interrogato">
          <tr>
            <td class="fissi">

              Denominazione

            </td>
            <td>ELETTRO SPA.
            </td>
            <td class="fissi">
              Codice Fiscale
            </td>
            <td>01234567890
            </td>
          </tr>
        </table>
      </div>



    </div>



    <div class="wrapper">





      <div align="center">
        <div id="wait" style="display:none;width:90px;height:90px;position:relative;top:300px;left:100px;padding:2px;"><img src="/CobraStatic/home/immagini/wait.gif" /><br>attendere...</div>
        <div id="waittoolong" style="display:none;position:relative;top:300px;left:100px;padding:2px;" class="diagnostico"><br>impossibile soddisfare la richiesta nei tempi previsti</div>
        <div id="ajaxerror" style="display:none;position:relative;top:300px;left:100px;padding:2px;" class="diagnostico"><br>problemi in fase di esecuzione della richiesta</div>
      </div>

      <div class="centrale_menu" id="centrale_menu">
        <a id="contenuto" name="contenuto"></a>
        <!-- #BeginEditable "Contenuti" -->








        <div class="centrato" align="center">





          <div class="datiTit">




            MODELLO IVA TR

            <br> Richiesta di RIMBORSO o utilizzo in compensazione del Credito IVA Trimestrale

          </div>
          <br>




          <div class="sinistra">
            Richiesta n. 18440848446 - 0000002 del 30/10/2018 presentata nell'ANNO

            <b>2018</b>
            <br><br>
          </div>


          <div class="container_modelli_tabs" id="container_modelli_tabs">




            <!--  includo JS per il Menu Alto -->
            <script type="text/javascript" src="/CobraUffici/js/menuAlto.js"></script>











            <div id="mainMenuAlto">

              <table>
                <tr>
                  <td valign="top">
                    <!-- tabella contenente le voci presenti per il documento -->
                    <table class="dati" summary="La tabella riporta le voci presenti per il documento">
                      <tr>
                        <!-- frontespizio -->

                        <td class="menuAlto" width="200px">
                          <a href="/CobraUffici/CobraWebServlet?Ric=IVR&CF=01234567890&Anno=2018&Protocollo=T18103018440848446002&Quadro=">
                        Frontespizio 
                </a>
                        </td>

                      </tr>
                      <!-- fine frontespizio -->


                      <!-- dichiarazione presentata -->

                      <tr>
                        <!-- dichiarazione PRESENTATA-->
                        <td class="menuAlto_sel" width="200px">
                          <a href="#" onClick="visualizzaMenuUp('MenuPresentato', 'menuUp')" title="Apri la Comunicazione Presentata">
                         Richiesta Presentata 
                </a>
                        </td>
                      </tr>


                      <!-- fine dichiarazione presentata -->

                    </table>
                  </td>
                  <td valign="top">
                    <!-- inizio a trattare i DIV contenenti i singoli menu -->

                    <!-- MENU dichiarazione presentata -->

                    <DIV id="MenuPresentato" class="menuUp">
                      <FIELDSET class="form_menuAlto">
                        <LEGEND> Richiesta Presentata </LEGEND>

                        <table class="tabella_menuAlto" align="left">


                          <!-- DICHIARANTE -->

                          <TR class="riga_tabella_menuAlto">
                            <td width="50">
                              &nbsp;&nbsp;<img src="/CobraUffici/immagini/freccia.gif" border="0">
                            </td>
                            <TD class="fissi" nowrap="nowrap">
                              Quadri
                            </TD>

                            <td width="20">
                              <a href="/CobraUffici/CobraWebServlet?Ric=IVR&CF=01234567890&Anno=2018&Protocollo=T18103018440848446002&stato=P&Quadro=TA&Modulo=1">
                    TA

                </A>
                            </TD>

                            <td width="20">
                              <a href="/CobraUffici/CobraWebServlet?Ric=IVR&CF=01234567890&Anno=2018&Protocollo=T18103018440848446002&stato=P&Quadro=TB&Modulo=1">
                    TB

                </A>
                            </TD>

                            <td width="20">
                              <a href="/CobraUffici/CobraWebServlet?Ric=IVR&CF=01234567890&Anno=2018&Protocollo=T18103018440848446002&stato=P&Quadro=TC&Modulo=1">
                    TC

                </A>
                            </TD>

                            <td width="20">
                              <a href="/CobraUffici/CobraWebServlet?Ric=IVR&CF=01234567890&Anno=2018&Protocollo=T18103018440848446002&stato=P&Quadro=TD&Modulo=1">
                    TD

                </A>
                            </TD>

                            <TD>&nbsp;&nbsp;
                            </td>

                          </TR>



                          <!-- fine DICHIARANTE -->



                        </table>

                      </FIELDSET>
                    </div>

                    <!-- fine MENU dichiarazione presentata -->
                  </td>
                </tr>
              </table>




            </div>








          </div>
          <br>

          <div class="borderOption" id="borderOption">
            <div class="dati_contenuto">















              <!-- titolo quadro -->
              <div class="sinistra">
                <b> Quadro TD modulo 1 -  

            <i>Presupposti - Rimborso e/o conpensazione - Altri dati</i>

            </b>
                <br>
              </div>





              <!--  STAMPA -->

              <div class="destra">
                <a href="/CobraUffici/CobraWebServlet?Ric=IVR&CF=01234567890&Anno=2018&Protocollo=T18103018440848446002&Quadro=TD&Modulo=1&stampa=P">
                  <img src="/CobraStatic/consultazioni/immagini/printer.gif" border="0" alt="Formato stampabile del quadro"> stampa
                </a>
              </div>

              <br>
              <!-- fine STAMPA -->


              <div class="destra">

                Importi in EURO &nbsp;&nbsp;&nbsp;
                <a href="/CobraUffici/CobraWebServlet?Ric=IVR&CF=01234567890&Anno=2018&Protocollo=T18103018440848446002&Quadro=TD&Modulo=1&valuta=L&stato=P&Riga=&Parte=">
                converti in <font size="+1">£</font></a>

                <br>
              </div>





              <table width="100%" class="base" summary="La tabella riporta i dati del documento">


                <TR class="riga2_tabella">


                  <TD CLASS="fissi" align="left" width="10%">

                    TD002
                  </td>

                  <TD CLASS="fissi" align="right" width="10%">
                    001
                  </TD>

                  <TD align="left" width="60%">

                    CASELLA OPERAZIONI NON IMPONIBILI

                  </TD>

                  <TD align="right" class="importi">
                    SI
                  </td>

                </TR>

                <TR class="riga2_tabella">


                  <TD CLASS="trasparente" width="10%">
                  </td>

                  <TD CLASS="fissi" align="right" width="10%">
                    002
                  </TD>

                  <TD align="left" width="60%">

                    Percentuale delle operazioni effettuate

                  </TD>

                  <TD align="right" class="importi">

                    68

                  </TD>

                </TR>

                <TR class="riga2_tabella">


                  <TD CLASS="fissi" align="left" width="10%">

                    TD006
                  </td>

                  <TD CLASS="fissi" align="right" width="10%">
                    001
                  </TD>

                  <TD align="left" width="60%">

                    IMPORTO DI CUI SI CHIEDE IL RIMBORSO

                  </TD>

                  <TD align="right" class="importi">

                    1.052.053,99

                  </TD>

                </TR>

                <TR class="riga2_tabella">


                  <TD CLASS="fissi" align="left" width="10%">

                    TD008
                  </td>

                  <TD CLASS="fissi" align="right" width="10%">
                    003
                  </TD>

                  <TD align="left" width="60%">

                    Esonero garanzie

                  </TD>

                  <TD align="right" class="importi">

                    1

                  </TD>

                </TR>

                <TR class="riga2_tabella">


                  <TD CLASS="trasparente" width="10%">
                  </td>

                  <TD CLASS="fissi" align="right" width="10%">
                    004
                  </TD>

                  <TD align="left" width="60%">

                    CASELLA FIRMA ATTESTAZIONE

                  </TD>

                  <TD align="right" class="importi">
                    SI
                  </td>

                </TR>

                <TR class="riga2_tabella">


                  <TD CLASS="trasparente" width="10%">
                  </td>

                  <TD CLASS="fissi" align="right" width="10%">
                    007
                  </TD>

                  <TD align="left" width="60%">

                    Codice fiscale professionista

                  </TD>

                  <td align="right" class="importi">
                    <a href="/CobraUffici/CobraWebServlet?Ric=CF&CF=PPNLSN73B46A390A">PPPPPP99B88A111A</a>
                  </td>

                </TR>

                <TR class="riga2_tabella">


                  <TD CLASS="trasparente" width="10%">
                  </td>

                  <TD CLASS="fissi" align="right" width="10%">
                    008
                  </TD>

                  <TD align="left" width="60%">

                    CASELLA FIRMA CAAF/PROFESSIONISTA

                  </TD>

                  <TD align="right" class="importi">
                    SI
                  </td>

                </TR>

                <TR class="riga2_tabella">


                  <TD CLASS="trasparente" width="10%">
                  </td>

                  <TD CLASS="fissi" align="right" width="10%">
                    041
                  </TD>

                  <TD align="left" width="60%">

                    Art.38 bis-Patrimonio netto non diminuito

                  </TD>

                  <TD align="right" class="importi">

                    1

                  </TD>

                </TR>

                <TR class="riga2_tabella">


                  <TD CLASS="trasparente" width="10%">
                  </td>

                  <TD CLASS="fissi" align="right" width="10%">
                    042
                  </TD>

                  <TD align="left" width="60%">

                    Art.38 bis-No cessione azioni ammontare > 50%

                  </TD>

                  <TD align="right" class="importi">

                    1

                  </TD>

                </TR>

                <TR class="riga2_tabella">


                  <TD CLASS="trasparente" width="10%">
                  </td>

                  <TD CLASS="fissi" align="right" width="10%">
                    043
                  </TD>

                  <TD align="left" width="60%">

                    Art.38 bis-Versamenti contributi effettuati

                  </TD>

                  <TD align="right" class="importi">

                    1

                  </TD>

                </TR>

                <tr class="riga_tabella_base">
                  <td colspan="4">
                  </td>
                </tr>

              </table>











            </div>
          </div>



        </div>



      </div>
    </div>


    <div class="vociMenu">




      <!-- Menù GENERALE -->


      <!-- template relativo alla gestione delle voci di menu s sx -->







      <h2 class="h2selezionato">Dati dei
        <BR>RIMBORSI</h2>
      <div class="datiMenu2Espansi">





        <!-- INIZIO AREE Rimb NORMALI -->

        <ul class="menu_ul">





          <li class="el_link_sel">
            <A href="/CobraUffici/CobraWebServlet?Ric=Rimb&CF=01234567890">
                            Rimborsi
                        </A>
          </li>

          <!-- INIZIO AREE RimbCF NORMALI -->





          <li class="el_link">
            <A href="/CobraUffici/CobraWebServlet?Ric=RimbCF&CF=01234567890">
                            Rimborsi da Conto Fiscale
                        </A>
          </li>


          <li class="el_end"></li>

        </ul>
      </div>





      <!-- template relativo alla gestione delle voci di menu s sx -->







      <h2 class="trigger"><a href="#">Informazioni<br>ANAGRAFICHE</a></h2>
      <div class="datiMenu2">





        <!-- INIZIO AREE Ana NORMALI -->

        <ul class="menu_ul">


          <!-- non ci sono gestioni specifiche -->


          <li class="el_link">
            <A href="/CobraUffici/CobraWebServlet?Ric=Ana&CF=01234567890">
                            Dati Anagrafici
                        </A>
          </li>

          <!-- INIZIO AREE AltreAna NORMALI -->


          <!-- non ci sono gestioni specifiche -->


          <li class="el_link">
            <A href="/CobraUffici/CobraWebServlet?Ric=AltreAna&CF=01234567890">
                            Altri dati Anagrafici
                        </A>
          </li>

          <!-- INIZIO AREE Rap NORMALI -->


          <!-- non ci sono gestioni specifiche -->


          <li class="el_link">
            <A href="/CobraUffici/CobraWebServlet?Ric=Rap&CF=01234567890">
                            Rapporti con Altri
                        </A>
          </li>


          <li class="el_end"></li>

        </ul>
      </div>


      ‘ other annoyng code..bla,bla..bla..
</BODY>

</HTML>
​
Nimantha
  • 6,405
  • 6
  • 28
  • 69
Mao
  • 1
  • 6

1 Answers1

0

A little difficult to tell without the URL to test with. I tested the following reading your HTML in from a file (see commented out lines). I then re-wrote for IE but obviously cannot test with actual page. I have added a timed loop in case tables are dynamically loaded to allow for data to be present.

Option Explicit
Public Sub GetTables()
    Dim clipboard As Object, i As Long, ws As Worksheet, tables As Object, t As Date
    Const MAX_WAIT_SEC As Long = 5
    Set ws = ThisWorkbook.Worksheets("Sheet1")
    'Dim html As HTMLDocument
    '    Set html = New HTMLDocument
    '    Set html = GetHTMLFileContent("C:\Users\User\Desktop\test.html")
    Dim IE As New InternetExplorer

    With IE
        .Visible = True
        .navigate "URL"

        While .Busy Or .readyState < 4: DoEvents: Wend

        t = Timer
        Do
            On Error Resume Next
            Set tables = .document.querySelectorAll("table")
            On Error GoTo 0
            If Timer - t > MAX_WAIT_SEC Then Exit Do
        Loop While tables.Length < 2
        Set clipboard = GetObject("New:{1C3B4210-F441-11CE-B9EA-00AA006B1A69}")
        For i = 0 To tables.Length - 1
            clipboard.SetText tables.item(i).outerHTML
            clipboard.PutInClipboard
            ws.Cells(LastRow(ws) + 2, 1).PasteSpecial
        Next
        .Quit
    End With
End Sub

Public Function LastRow(ByVal sh As Worksheet) As Long
    On Error Resume Next
    LastRow = sh.Cells.Find(What:="*", _
                            After:=sh.Range("A1"), _
                            Lookat:=xlPart, _
                            LookIn:=xlFormulas, _
                            SearchOrder:=xlByRows, _
                            SearchDirection:=xlPrevious, _
                            MatchCase:=False).Row
    On Error GoTo 0
End Function

'Public Function GetHTMLFileContent(ByVal filePath As String) As HTMLDocument
'    Dim fso As Object, hFile As Object, hString As String, html As HTMLDocument
'    Set html = New HTMLDocument
'    Set fso = CreateObject("Scripting.FileSystemObject")
'    Set hFile = fso.OpenTextFile(filePath)
'
'    Do Until hFile.AtEndOfStream
'        hString = hFile.ReadAll()
'    Loop
'
'    html.body.innerHTML = hString
'    Set GetHTMLFileContent = html
'End Function
QHarr
  • 83,427
  • 12
  • 54
  • 101
  • Thanks. URL Is notebook public, It a Enterprise intranet. I Can Do in IE but not using winhttp. I be able ti get the code and create a file contenet the http.reaponse – Mao Dec 09 '18 at 08:45
  • Thanks for the effort. I have just created a .txt file with all the html code scraped from the page using winhhttp. The file contains all the html code but i can't take the TD008 outertext. I can take what I need if i use Internet Explorer but i can't if i use winhttp. so assuming that i have to create a txt file before, so how can i get my TD008 outertext value without using Internet Explorer? – Mao Dec 11 '18 at 08:08
  • read html into an html document then use html.querySelectorAll("table.base td").item(12).outerHTML – QHarr Dec 11 '18 at 09:00
  • Or html.querySelector("table.base tr:nth-of-type(7) td + td").outerhtml – QHarr Dec 11 '18 at 09:04
  • 1
    Thanks.i did this
    I dim html As HTMLDocument Set html = New HTMLDocument Set html = GetHTMLFileContent("E:\testo2.htm") So how do i use the"html.querySelectorAll("table.base td").item(12).outerHTML"?
    – Mao Dec 12 '18 at 09:18
  • Ok. What do you need help with? Is this a new question or something missing from the above? – QHarr Dec 12 '18 at 09:49
  • Missing from above. I use the GetHTMLFileContent function pointing at the E:testo2.html. ...and i dont understand i do use the " html.querySelector" or " html.querySelectorall"... thank a lot..and apologize me if i can't understood – Mao Dec 12 '18 at 10:29
  • Sorry I didn't see this response. What needed sorting with the above? – QHarr Dec 13 '18 at 17:23
  • You use querySelector to retrieve a single element (the first match for the css selector inside the ""). QuerySelectorAll returns all matched elements. Can this question now be marked as solved? – QHarr Mar 01 '19 at 13:51