I need a way to get ALL odds of ALL events of bookmakers
I am using Scrapy+Splash to get the first javascript-loaded content of the site. But to get all other odds, I have to click "Spagna-LigaSpagnola", "Italia->Serie A", etc.
How can I do that ?
I need a way to get ALL odds of ALL events of bookmakers
I am using Scrapy+Splash to get the first javascript-loaded content of the site. But to get all other odds, I have to click "Spagna-LigaSpagnola", "Italia->Serie A", etc.
How can I do that ?
You can emulate behaviors, like a scroll, or a click, by writting a JavaScript script and by telling Splash to execute that script when it renders your page.
A little exemple:
You define a JavaScript function that selects an element in the page and then clicks on it:
(source: splash doc)
Then, when you
request, you modify theendpointand set it to"execute", and you add"lua_script": _scriptto the args.You will find all the informations about splash scripting here