开发者

Is there a way to mimick a google/yahoo finance Ajax call?

开发者 https://www.devze.com 2023-03-10 04:30 出处:网络
I am aware if you try to scrape the google/yah开发者_运维百科oo finance websites you\'re at risk of being blocked by their server. I was therefore wondering what if you could spoof the google/yahoo aj

I am aware if you try to scrape the google/yah开发者_运维百科oo finance websites you're at risk of being blocked by their server. I was therefore wondering what if you could spoof the google/yahoo ajax call (which they use to update the prices on the webpage if you leave it open) back to the server each time you wanted a price, surely the google/yahoo server wouldnt count this towards the daily request limit?

Is this possible?


If you try to do it via JavaScript, you'll probably run into problems with the same origin policy. You can't do ajax requests to Google/Yahoo from one of your own sites (when not using an official JavaScript API provided by Google/Yahoo).
You can try it using another programming language by inspecting the http calls using Wireshark, Fiddler or similar, and rebuilding the request with the correct headers. This will probably violate the terms of service though (getting you banned), and might even be illegal.

0

精彩评论

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