Curl or WebService Running JavaScript

0

I'm having a chronic problem, so I need a CURL request to execute code in JavaScript as well.

Generally, all posts and references point to the same answer, that curl has no ability to execute JavaScript code, however I have already found Java APIs that executed the CURL function promising to run JavaScripts codes (like HTML Unit, for example), however I noticed that these APIs were abandoned by the developers.

I would need something in this sense because I need to interact with sites that make requests via JavaScript.

It is no use seeing the request by the browser and placing it in the curl, this JavaScript code is precisely to prevent interaction by webServices, creating JavaScript keys that are sent to the server to release the next request.

In short, I need some API, code, facility or technology that can simulate a browser by enabling Curl requests but running JavaScripts codes as is the promise of this HTMLUnit api.

The ideal would be in PHP language, but I believe it does not exist, in default JAVA solves.

Could anyone please help me with this problem?

    
asked by anonymous 07.11.2015 / 16:29

1 answer

0

A cool way to emulate browsers is via Selenium using Java, C #, Ruby, Python, or Javascript with NodeJS. Through it it is possible to perform operations in an emulated web browser.

Usually used for testing, but can suit your case. But then your application would be no different from a robot and could be used for beneficial purposes or not.

    
14.12.2015 / 17:03