Create .JS parser

Cancelled Posted Apr 6, 2012 Paid on delivery
Cancelled Paid on delivery

I have a web crawler but it has problems with .js, for example if you open this site: [[url removed, login to view]][1] and download the main page you will get:

<script type="text/javascript" language="JavaScript">

function endsWith(str, suffix) {

return [url removed, login to view](suffix, [url removed, login to view] - [url removed, login to view]) !== -1;

}

//alert(endsWith([url removed, login to view] ,'[url removed, login to view]' ));

if(endsWith([url removed, login to view] ,'[url removed, login to view]' ) ){

// [url removed, login to view]

window.location.href="http://"+document.domain+"/smartsource/[url removed, login to view]";

}else if(endsWith([url removed, login to view] ,'[url removed, login to view]' ) ){

//[url removed, login to view]

window.location.href="http://"+document.domain+"/utilisource/[url removed, login to view]";

}else if(endsWith([url removed, login to view] ,'[url removed, login to view]' ) ){

//[url removed, login to view]

window.location.href="http://"+document.domain+"/smartsource/[url removed, login to view]";

}else{

}

</script>

I need a C++ class that will receive the html file and will parse and execute the .js and will return the html after the .js has been executed.

Few notes:

1. Don't use Microsoft parser.

2. Make sure that during the parsing no Windows will open (like if you use MS parser)

You will probably need to use one of the existing .js parser, please let me know which one you plan to use, also project should not use MFC.

C Programming

Project ID: #2729420

About the project

Remote project Active Apr 18, 2012