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

195
Visualizações
Need to append Session Variable to URL to make requests

I'm using python requests_html to scrape a website behind a login. I've done this previously without issue, but now the site appends a query paramenter of sessionCacheKey to each url to make a valid request. The sessionCacheKey variable is stored in the browsers local and session storage. Does anyone know how or if it is possible to access local or session storage with python/requests_html? I have tried manually copying the session variable from chrome into my python request and it works. I just need to know how I can access it and store it in a variable in python to use for all future requests. Thanks for any help.

Below is the script assigning sessionCacheKey to local and session storage.

                'setSessionCacheKey': function(){
                externalLoginCheck();
                var currentSessionCacheKey = getQueryParamByName('sessionCacheKey', window.location.href);
                window.sessionStorage.setItem('sessionCacheKey', currentSessionCacheKey);
                window.localStorage.setItem('sessionCacheKey', currentSessionCacheKey);
                if (duplicateTabConditions()) {
                    var newSessionCacheKey = getNewSessionCacheKey(currentSessionCacheKey);
                    $.ajax({
                        url: '/AM/RemoteProxy/SessionManagerProxy.cfc?method=copySessionCacheToNewKey&SourceSessionCacheKey=' + currentSessionCacheKey + '&DestinationSessionCacheKey=' + newSessionCacheKey,
                        success: function (result) {
                            reloadLocation = removeParam("sessionCacheKey", window.location.href);
                            var separator = reloadLocation.match(/\?/) ? '&' : '?';
                            window.location = reloadLocation + separator + 'sessionCacheKey=' + newSessionCacheKey;
                        },
                        async: false
                    });
                }
over 4 years ago · Santiago Trujillo
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