Hi. I'm trying to learn Scrapy-Splash. Within the below Splash lua script, the png returned does not show the updated element.
The javascript does work in Chrome Dev Tools.
Any push in the right direction is appreciated.
function main(splash, args) assert(splash:go("https://news.ycombinator.com/")) splash:runjs([[ el = document.evaluate('//b[@class="hnname"]',document, null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue; if (el != null) { el.textContent = 'Javascript Injection'; } ]]) return {png=splash:png()} end
Hello,
I understand that there was a Support ticket for this issue and Javascript Injection can be done through splash through js_source https://splash.readthedocs.io/en/stable/api.html#executing-custom-javascript-code-within-page-context.
Graham Anderson
Hi. I'm trying to learn Scrapy-Splash. Within the below Splash lua script, the png returned does not show the updated element.
The javascript does work in Chrome Dev Tools.
Any push in the right direction is appreciated.
Hello,
I understand that there was a Support ticket for this issue and Javascript Injection can be done through splash through js_source https://splash.readthedocs.io/en/stable/api.html#executing-custom-javascript-code-within-page-context.
thriveni
Hello,
I understand that there was a Support ticket for this issue and Javascript Injection can be done through splash through js_source https://splash.readthedocs.io/en/stable/api.html#executing-custom-javascript-code-within-page-context.
-
How click an element and close a popup?
-
How many slots are the hosted splash servers configured with?
-
Splash with complex lua scripts
-
Scrapy Splash Scrapinghub deployment issue
-
Crawlspider and Splash
-
Interacting with Javascript Popup
-
Items API - RSS
-
Crawlera and MySQL connection
-
Scrapy and Splash times out for a specific site.
-
Can't make Splash works receiving HTTP 401
See all 36 topics