Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

205
Views
Necesita agregar la variable de sesión a la URL para realizar solicitudes

Estoy usando python request_html para raspar un sitio web detrás de un inicio de sesión. Lo hice anteriormente sin problemas, pero ahora el sitio agrega un parámetro de consulta de sessionCacheKey a cada URL para realizar una solicitud válida. La variable sessionCacheKey se almacena en el almacenamiento local y de sesión de los navegadores. ¿Alguien sabe cómo o si es posible acceder al almacenamiento local o de sesión con python/requests_html? Intenté copiar manualmente la variable de sesión de Chrome en mi solicitud de Python y funciona. Solo necesito saber cómo puedo acceder a él y almacenarlo en una variable en python para usar en todas las solicitudes futuras. Gracias por cualquier ayuda.

A continuación se muestra el script que asigna sessionCacheKey al almacenamiento local y de sesión.

 '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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!