joshua 1 Posted April 8, 2010 Report Share Posted April 8, 2010 There is a javascript in the web page i want to scrape. This javascript loads an HTML file in an IFrame. I want to access the HTML in this IFrame which is dynamically created by the javascript, and scrape the content in it. How to do this with ubot?? Any suggestions. Thank you all Quote Link to post Share on other sites
greencat 18 Posted April 9, 2010 Report Share Posted April 9, 2010 There is a javascript in the web page i want to scrape. This javascript loads an HTML file in an IFrame. I want to access the HTML in this IFrame which is dynamically created by the javascript, and scrape the content in it. How to do this with ubot?? Any suggestions. Thank you all Find the url of the iframe and then navigate to it directly. Quote Link to post Share on other sites
joshua 1 Posted April 10, 2010 Author Report Share Posted April 10, 2010 Find the url of the iframe and then navigate to it directly. The url of the iframe is dynamically created by the javascript. That's what i need to take. Quote Link to post Share on other sites
greencat 18 Posted April 10, 2010 Report Share Posted April 10, 2010 The url of the iframe is dynamically created by the javascript. That's what i need to take. Then you'll probably have to reverse engineer which ever code creates the url - and create your own url before navigating to it. Quote Link to post Share on other sites
joshua 1 Posted April 12, 2010 Author Report Share Posted April 12, 2010 Then you'll probably have to reverse engineer which ever code creates the url - and create your own url before navigating to it. How can i call run the javascript.js on the page which creates the iframe and get the output/variables of it to a variable? Quote Link to post Share on other sites
greencat 18 Posted April 12, 2010 Report Share Posted April 12, 2010 How can i call run the javascript.js on the page which creates the iframe and get the output/variables of it to a variable? If the page is loading and displaying the iframe - then the url has been generated. The only thing you need to work out is what javascript variable(s) are being used to build it. You can then do something like: set variable = eval (javascript variable(s)); If you don't know javascript (and even if you do if the coder has tried to obscure it) - it's going to be fairly tricky to work out what's going on. If you post the page - I may be able take a quick look. You may even be able to get the url of the iframe via javascript directly (the src property is probably the one to go for): http://www.devarticles.com/c/a/JavaScript/Working-with-IFRAME-in-JavaScript/1/ should be enough to get you going though. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.