Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

264
Vistas
Push data from a websocket / js script via Selenium to python script

I need to read a variable from a js script.

However, the variable gets constantly updated by a websocket pushing new messages to the client.

So each time a message gets pushed from the server to the client the js script processes the data.

Now, I already tried to access the websocket via python websocket client. However, I cannot connect directly. Therefore instead I will need to use Selenium with Chrome to get the data from the websocket.

Now, I am not exactly sure yet how to do this.

But my idea is something like this:

  1. Open the website with Selenium
  2. Modify the javascript file at the point where the websocket message gets processed.
  3. Modify this location by adding something like an event emitter. Ie alter the js script and add a new js codeline at exactly this location.
  4. In my python script listen to this event emitter to capture the value each time a new message gets pushed from the websocket.

My question: is this possible and if so how to do this?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda