0

I just compile a source code to login in intranet login page, navigate trough page, scrape data and so on using internet application and vba starting from a Excel form. So, i would like to do the same thing using silently connection. I am be able to login, and navigate through some pages but not in the one which I have to reach clicking on a hyperlink text such as <a href=/home/webservlet>info</a> If I go direct mode to the url i.e. http as winhttp object so http.open("get", http:// homeserver/home/webservlet)

The response is "not logged…"or something else. I see that in the html code there is jquery, so i think that sending through winhttp the right parameter to the jquery. Is it a bad idea? and how to do it?

************addedd html code page. in bold the href i want to reach****** **

this is the link that i want        
                <li class="el_link"><a href="/S*****Uffici/S*****WebServlet">Informazioni Generalizzate</a>
                </li>****

<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">
<!--  includo CSS Base -->
<LINK REL=STYLESHEET TYPE="text/css" HREF="/S*****Static/home/css/S*****Home.css">

<LINK REL=STYLESHEET TYPE="text/css" HREF="/S*****Static/home/css/jquery-ui-1.8.10.custom.css">



<!--  includo i JS di Servizio dinamicamente -->
<script type="text/javascript" src="/S*****Static/home/js/jquery.js"></script>

<script type="text/javascript" src="/S*****Static/home/js/toggleHome.js"></script>



<!--  includo il titolo dinamicamente -->
<TITLE>
Servizi di ********.

</TITLE>

</HEAD>
<BODY>

<div class="contenitore">




<div id="testata">
        <div id="testata_fondo_i">
            <div id="testata_sx"><a href="http://www.a*****.it/" title="Vai al sito [Link a sito esterno]" target="_agenziaWindow"><img
    src="/S*****Static/home/immagini/logo.gif" alt="Sito *********"></a>
    </div>
            <div id="testata_centro_i"></div>
            <div id="testata_dx_i"></div>

        </div>
</div>  










                    <LINK REL=STYLESHEET TYPE="text/css" HREF="/S*****Static/home/css/menu_dropDown.css">
<!--[If lt IE 9]>
     <LINK REL=STYLESHEET TYPE="text/css" HREF="/S*****Static/home/css/menu_dropDown_IElt9.css">
<![endif]--> 
<!--[If IE 9]>
     <LINK REL=STYLESHEET TYPE="text/css" HREF="/S*****Static/home/css/menu_dropDown_IE9.css">
<![endif]--> 
<div class="menu_orizzontale">
<div class="menu">
   <ul class="blockeasing">
        <li class="main">
                 <a href="/S*****Home"> Home SERVIZI</a>
        </li>
        <li class="main">
             <a href="#">Consultazioni</a>
                 <ul class="subnav0">
                      <li><a href="/S*****Uffici/S*****WebServlet">Informazioni Generalizzate</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="/CciaaConsultazioneWeb/CCIAAServlet">Camera di Commercio</a></li>
                      <li><a href="/Conto/E*****Servlet">Estratto Conto </a></li>
                 </ul>
        </li>
   </ul>
</div>
</div>
<div class="esci">
        <a href="/S*****Home/CloseSession"> Esci</a>
</div>
<div class="user">
           Utente connesso <i><b>P*************R</b></i>
</div>
<script type="text/javascript" src="/S*****Static/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="vociMenu">




<!-- script per la corretta visualizzazione delle colonne -->





        <!-- Link al servizio composto da sottomenu -->

            <h2 class="trigger"><a href="#">Consultazioni</a></h2>
            <div class="datiMenu2">
                <ul class="menu_ul">


**‘ this is the link that i want        
            <li class="el_link"><a href="/S*****Uffici/S*****WebServlet">Informazioni Generalizzate</a>
            </li>**




            <li class="el_link"><a href="/CollegamentoTerritorioWeb/TerritorioServlet">Catasto e Conservatorie</a>
            </li>



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



        <!-- Link al servizio composto da sottomenu -->

            <h2 class="trigger"><a href="#">Consultazioni<br>Dati non A.T.</a></h2>
            <div class="datiMenu2">
                <ul class="menu_ul">



            <li class="el_link"><a href="/CciaaConsultazioneWeb/CCIAAServlet">Camera di Commercio</a>
            </li>




            <li class="el_link"><a href="/ContoEquitalia/EquitaliaServlet">Estratto Conto AdER</a>
            </li>



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









</div>

<!-- 
<div class="validator">
     <p>
        <a href="http://validator.w3.org/check?uri=referer"><img
         src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Transitional" height="31" width="88"></a>
    </p>

</div>
 -->
<div class="footer">
    <div class="destra">
         <img src="/S*****Static/home/immagini/Sogei.gif" alt="logo Sogei">
    </div>
</div>
</div>
</BODY>
</HTML>
Mao
  • 1
  • 6
  • 1
    Please read this https://stackoverflow.com/help/how-to-ask – Rich Sep 19 '18 at 14:59
  • Please include the relevant HTML and your code. See [mcve] and [ask] for help. Remember when providing HTML to use the snippet tool available via [edit]. – QHarr Sep 19 '18 at 14:59
  • Not logged response means that you have not provide cookies within request header. WinHTTP doesn't handle cookies, so the code should receive, store and send them. You may use MSXML2.XMLHTTP that supports cookies processing, and automatically adds the necessary cookies to requests, even they was received in IE. Check [WinINet vs. WinHTTP](https://msdn.microsoft.com/en-us/library/windows/desktop/hh227298(v=vs.85).aspx). – omegastripes Sep 19 '18 at 18:34
  • Possible duplicate of [vba how to read and store LTPA?](https://stackoverflow.com/questions/52382880/vba-how-to-read-and-store-ltpa) – omegastripes Sep 19 '18 at 19:08
  • Well, i'm trying a different approach to the same problem...maybe it's not a cookies..maybe a non correct http code o maybe something else – Mao Sep 20 '18 at 07:42

0 Answers0