[Python] listen to JSON

whiteaxe

Newbie
Joined
Dec 14, 2018
Messages
30
Reaction score
4
Hi there guys,

I got this situation.

I would like to use selenium, soap or requests to scrape a website. My problem is that while i stay the website opened i this one sends a json to update the info. Is there a way to get this json wich is sent every minute?



Thanks
 
There's no such thing as "sent every x minutes". There are very limited ways for a connection to remain open for you to be pinged with data :

1. Websockets
2. SSE (https://en.wikipedia.org/wiki/Server-sent_events)

The other (very likely) thing that is happening here, is that the javascript in the page you have open is sending requests every x minutes.
In all the cases above you can just open your browser's network tab and watch which routes are being queried.
 
Back
Top