本文介绍了Yahoo财务webservice v1有什么问题? API改变了?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用来输入浏览器: http://finance.yahoo.com/webservice/v1/symbols/YHOO,AAPL/quote?bypass=true&format=json&view= detail 并解析答案...

I was used to type in a browser : http://finance.yahoo.com/webservice/v1/symbols/YHOO,AAPL/quote?bypass=true&format=json&view=detail and parse the answer...

它不再工作,请参阅:

It's not working anymore, see: Has Yahoo finance web service disappeared? API changed? Down temporarily?

命令

curl -A "Mozilla/5.0 (Linux; Android 6.0.1; MotoG3 Build/MPI24.107-55) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.81 Mobile Safari/537.36" http://finance.yahoo.com/webservice/v1/symbols/YHOO,AAPL/quote?bypass=true&format=json&view=detail

也提供

任何想法请求中出现什么问题?

Any idea what's wrong in the request?

推荐答案

如果您在GET请求中使用下面的标头,它会工作...

If you use the headers below in your GET request, it will work...

"User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 9_3 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13E230 Safari/601.1"

这篇关于Yahoo财务webservice v1有什么问题? API改变了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 12:58