0

I'm trying to get the sourcecode of a remote website. The problem is this website execute a javascript in fist time. This javascript create a cookie and then redirect to the final website. If I try to get the sourcecode in a new URL object and read it, the only that I've got is this javascript instead of the sourcecode of final webpage.

My question is how I can load the URL, then execute this javascript and finally get the sourcecode of the final website?

Or even how I can wait some seconds before trying to get the sourcecode avoiding get the javascript that creates de cookie and then redirects to the main website?

Thanks for all!

3
  • Possible duplicate of How to execute javascript on a webpage using java Commented Feb 13, 2017 at 16:50
  • And how are you grabbing the remote data, with AJAX? Commented Feb 13, 2017 at 16:53
  • Please add some cod, as we can t guess how u actually achieving it Commented Feb 13, 2017 at 16:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.