yahoo-api 相关问题

涵盖Yahoo!提供的开放式Web服务和API

从雅虎财经获取 1 分钟柱线

我正在尝试从雅虎财经下载当天和前一天的 1 分钟历史股票价格。 Yahoo(就像 Google)支持长达 15 天的数据,使用

回答 3 投票 0

从雅虎获取口语

如何使用YQL获取一个国家的口语? 我的方法是: 从 geo.countries 中选择 lang,其中 name ="Italy" 但我总是以英语作为语言: { “询问”: { “计数”:1, ”

回答 1 投票 0

雅虎问答 API 无法正常工作

我找到了一个我想实现的 PHP API 示例,但它似乎不起作用。 我找到了一个我想实现的 PHP API 示例,但它似乎不起作用。 <?php /** * @package Yahoo Answer * @author The HungryCoder * @link http://hungrycoder.xenexbd.com/?p=953 * @version 1.0 * @license GPL, This class does not come with any expressed or implied warranties! Use at your own risks! */ class yahooAnswer{ var $appID; var $searchQuestionURL = 'http://answers.yahooapis.com/AnswersService/V1/questionSearch?'; var $getQuestionURL = 'http://answers.yahooapis.com/AnswersService/V1/getQuestion?'; private $numResults = 10; private $numStart = 0; function __construct($appid) { $this->appID=$appid; } function set_numResults($num_results){ $this->numResults = $num_results; } /** * Search for questions for the given keywords. Returned results can be associative array or XML * @param <string> $kewyord * @return <string> Returns the results set either in XML format or associative array. */ function search_questions($params){ if(!is_array($params)){ throw new Exception('The parameters must be an array!'); } $defaults = array( 'search_in' => '', 'category_name' => '', 'date_range' => '', //7, 7-30, 30-60, 60-90, more90 'sort' => 'relevance', //relevance, date_desc, date_asc 'type' => 'all', 'output' => 'php', 'results' => $this->numResults, 'start' => $this->numStart, 'region' => 'us', 'appid' => $this->appID, ); $params = array_merge($defaults,$params); if(!$params['appid']){ throw new Exception('APP ID is empty!', 404); } if(!$params['query']) { throw new Exception('Query is not set!', '404'); } $req_params = $this->array2query_string($params); $url = $this->searchQuestionURL.$req_params; $results = $this->make_call($url); if($params['output']=='php'){ $results = unserialize($results); return $results['Questions']; } return $results; } /** * Get all answers of a given question ID * @param <array> $params keys are: question_id, output, appid * @return <string> Returns all answers in expected format. default format is php array */ function get_question($params){ if(!is_array($params)){ throw new Exception('The parameter must be an array!'); } $defaults = array( 'question_id' => '', 'output' => 'php', 'appid' => $this->appID, ); $params = array_merge($defaults,$params); if(!$params['appid']){ throw new Exception('APP ID is empty!', 404); } if(!$params['question_id']) { throw new Exception('Question ID is not set!', '404'); } $req_params = $this->array2query_string($params); $url = $this->getQuestionURL.$req_params; $results = $this->make_call($url); if($params['output']=='php'){ $results = unserialize($results); return $results['Questions'][0]; } return $results; } protected function make_call($url){ if(function_exists('curl_init')){ $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1); curl_setopt($ch, CURLOPT_TIMEOUT,60); $result = curl_exec($ch); curl_close($ch); return $result; } else if(function_exists('file_get_contents')) { return file_get_contents($url); } else { throw new Exception('No method available to contact remote server! We must need cURL or file_get_contents()!', '500'); } } protected function array2query_string($array){ if(!is_array($array)) throw new Exception('Parameter must be an array', '500'); $params =''; foreach($array as $key=>$val){ $params .= "$key=$val&"; } return $params; } } $appid = "myId"; $params = array( 'query' => 'keyword', //enter your keyword here. this will be searched on yahoo answer 'results' => 10, //number of questions it should return 'type' => 'resolved', //only resolved questiosn will be returned. other values can be all, open, undecided 'output' => 'php', //result will be PHP array. Other values can be xml, json, rss ); $query = 'yoga'; //enter your keyword here to search for $yn = new yahooAnswer($appid); //search questions try{ $questions = $yn->search_questions($params); } catch (Exception $e){ echo ($e->getMessage()); } ?> 但是当我删除该 $appid 定义时,我收到一条消息,APPID 为空,当我输入 $appid 的 appid 时,我只是得到一个空白页面,但我确实有一个 appid,并且我直接从雅虎。 关于如何让它发挥作用有什么建议吗? 各种版本的API已被废弃,并且已停止提供官方支持。 最新工作版本是v8。 示例: https://query2.finance.yahoo.com/v8/finance/chart/aapl

回答 1 投票 0

如何在网站内容中添加注音假名?

我需要为我的日语网站内容制作自动注音视图。为此,我只是尝试了许多可能的解决方案。 在雅虎的 API 中有一种方法可以做到这一点。 我需要为我的日语网站内容制作自动注音视图。为此,我只是尝试了许多可能的解决方案。 在雅虎的 API 中有一种方法可以做到这一点。 <?php $appid = 'My api Key'; $sentence1="日本"; $sentence = mb_convert_encoding($sentence1, 'utf-8', 'auto'); echo $request = "http://jlp.yahooapis.jp/FuriganaService/V1/furigana?appid=".$appid."&sentence=".urlencode($sentence); 但是在这个 Yahoo API 中,我们需要将所有内容包含到一个变量中并分成单独的。它可以节省更多时间,因为我的内容是动态的。 我需要一个自动注音解决方案,例如 IPA Furigana Google Extension。 预先感谢。 https://www.furiousgana.com/api/ 为任何可能对注音生成感兴趣的人添加此内容。 您可以通过向此“https://api.furiousgana.com”发送发布请求并将数据正文设置为对象或数组来生成注音假名。 英文标签是可选的。 const query = [ { japanese:'気を付けて', english:'Take care!' }, { japanese:'お元気ですか?', english:'Are you ok?' } ] axios({ method: 'post', url: 'https://api.furiousgana.com', data: query }) .then(({data})=>{ console.log(data) // here is you data }); 最后一步是解析生成的注音假名,以便将内容包装在 & 标签中 这个 github 将有助于完整的注音。 只需将变量传递给 kuroshiro.convert('variable'),然后您将获得带有注音假名和 ruby 标签的数据。 https://github.com/hexenq/kuroshiro.js

回答 2 投票 0

雅虎幻想体育API

还有人在使用 Yahoo Fantasy Sports API 吗?我有一个去年运行的应用程序,根本没有更改我的代码,现在当我尝试运行它时,它返回 500 内部错误。 我曾经

回答 2 投票 0

如何通过VBA在Excel中提取雅虎财经“看跌期权”?

我是VBA初学者。我想将“Put Options Data”从 Yahoo Finance 提取到 Excel 中。谁能推荐一个 Excel VBA 脚本吗?

回答 2 投票 0

如何使用API获取雅虎拍卖产品的出价状态

我正在将雅虎拍卖 API 集成到我的网站中。我无法获取雅虎拍卖产品的出价状态。 http://auctions.yahooapis.jp/AuctionWebService/V1/BidHistory?appid=XXXXXXXXXXXXXXXXXXXXXXXXXX&auc...

回答 1 投票 0

在 PDF 文档的元数据中搜索

我一直在使用 Google 自定义搜索 API 来执行以下任务: 使用“filetype:pdf”搜索某些关键字 这按预期工作正常,但它只允许在

回答 1 投票 0

为什么 yahoo oauth2 获取 token api 总是返回“code cant be null”?

在此输入图像描述 在此输入图像描述 我按照文档传递参数,但总是返回“code 参数不能为空 forauthorization_code grant t...

回答 1 投票 0

如何在 vespa 中运行最近邻搜索?

尝试使用以下查询获取给定嵌入的最近邻居: vespa 查询 -v 'yql=从 VectorSearch3_content 选择文本,其中 {targetHits:10}nearestNeighbor(embedding,q)' 'hits=1' 'r...

回答 1 投票 0

Yahoo Finance API - GET 报价返回“无效 Cookie”

在过去的几年里,我一直在使用以下链接来获取查询中符号的完整当前报价: https://query1.finance.yahoo.com/v7/finance/quote?symbols=AAPL 突然间...

回答 1 投票 0

我很好奇是否有办法导入我的日本客户的雅虎拍卖提要列表,以在他们的网站上以网格或轮播格式显示

如果有办法使用某种 API 导入雅虎拍卖帐户的当前列表,以在 Wordpress 网络上显示可用产品,我还没有找到任何文章...

回答 0 投票 0

使用雅虎金融进行数据抓取

我想从雅虎财经抓取财务报表数据以进行财务分析。但是,该代码根本不检索任何数据,而是跳过所有代码。你能帮我...

回答 0 投票 0

yahoo邮件客户端删除了锚标签中的href值。

下面是邮件中发送的邮件模板片段代码。

回答 1 投票 1

雅虎API - 当之前的访问令牌过期时,无法请求新的访问令牌。

我正试图使用雅虎的API来制作梦幻足球,我最初能够收到访问令牌和刷新令牌,但一旦该访问令牌过期,我就无法获得另一个令牌。我能够收到一个访问令牌和刷新令牌最初,但一旦该访问令牌已经过期,我无法获得另一个。我的...

回答 1 投票 0

能否在Angular 8中调用yahoo contact API?

我在Angular应用中的代码是:ngOnInit(): void { this.route.queryParams...。

回答 1 投票 0


geolocation yahoo maps api

我正在尝试从地理位置获取坐标以用于我的yahoo map。我已经在firefox,chrome和Internet Explorer版本12.0、18.0.1025.168 m和9.0.8112.16421中运行了它。在Firefox中,它要求...

回答 3 投票 0

如何从API获取Yahoo天气背景?

我有一个天气小部件,我需要动态背景。雅虎有天气API,但是我找不到与天气类型相关的背景图片。 https://weather.yahoo.com/这可能吗? var ...

回答 3 投票 3

如何为Yahoo开发者帐户启用mail-r范围

我已经在https://developer.yahoo.com/apps/BY4faaaa/上注册了我的应用程序,如何授予yahoo邮件阅读范围?由于仪表盘中未显示mail-r范围,如何启用它? ...

回答 1 投票 2

© www.soinside.com 2019 - 2024. All rights reserved.