Hi i am doing an exercise where I am trying to scrape content of nytimes website using javascript/ajax.
In order to send cross domain ajax request I am using a proxy server that returns me jsonp response with nytimes website content.
But since that html content has some charaters (single quotes) which throws "Illegal Character" error.
<script type="text/javascript" src="http://json-proxy.jgate.de/?callback=callback&url=http%3A%2F%2Fwww.nytimes.com%2F"></script>
<script>
function callback(obj) {
alert(obj);
}
</script>
What could be a possible solution to this error? And what are other alternatives to solve this?
Thanks
(p.s. This question was asked to one my friends in his interview)
Update: Here is yahoo pipes link for the same. http://pipes.yahoo.com/pipes/pipe.run?_id=748e37c218ed0747d0b868ae8eafefa6&_render=json