开发者

Downloading and XPathing crossdomain document

I'm asking you for solution of problem described in the title. I found lot of possible sol开发者_如何学Goutions, but there also lot of problems.

What I want to do?

I want write a function foo(nick) which returns extracted information from other.com.

How I want to do it?

1. I want to download content of other.com.

2. Then i want to parse it as HTML.

3. Next I want to extract (with xpath) some useful information's

Yours sincerely Aliron


If the browser supports CORS and the server has Cross-Origin Resource Sharing (CORS) enabled than you can make an Ajax call.

When the browser or server do not support it, you need to use a serverside proxy on your domain to fetch the content.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜