Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

123
Visualizações
selenium execute_script only returns plain list
self.driver.get(self.DEL_PINO)
        resp = self.driver.execute_script("""
            var targetDate = "20220325"
            var jcd = "01";
            var resp = [];
            url = '/rsv.selectTimeScd.dp/dmparse.dm';
            data = {"fRsvD":targetDate, "fJiyukCd":"01"};
            $('div.rsvTable tbody#rsvTableBody').html("");
            postAjax(url, data, function(result){
                var timesList = result.times;
                var rowcnt_this = 1;
                
                for(var i=0; i<timesList.length; i++) {
                    var rowcnt = timesList[i].rowcnt;
                    var label = timesList[i].rsLabel.replace(":", "시 ") + "분";
                    var btClass = '';
        
                    resp.push("javascript:setFdata('"+jcd+"','"+timesList[i].fRsvD+"','"+timesList[i].fRsvT+"','"+timesList[i].fRsvDv+"', '"+timesList[i].fGubunCd+"', '"+timesList[i].fSelfYn+"', '"+timesList[i].fRoundCode+"', '"+btClass+"','"+timesList[i].dcAmt+"','"+timesList[i].assn_ind_inwon+"','"+timesList[i].fGubunCode+"','"+timesList[i].fRoundInd+"','"+timesList[i].fAssnInd+"','"+timesList[i].fInTerms+"','"+timesList[i].fSelfCartYn+"');");
                
                    if(rowcnt_this == rowcnt)
                        rowcnt_this = 1;
                    else
                        rowcnt_this++;
                }
            });
            
            return resp;
        """)
        print(resp)

I am trying to get the reservation list of the website by execute_script. However, I always get the result of

[]

How can I solve this problem?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda