Looking for help with the above.
If you use the URI listed below in a browser (Firefox & Chrome) it works; however, if I try it from cURL (or wget) it does not return the same results (to me it does not work). See results below. I have even tried to use other languages (VBA) and the same result, even tried to duplicate the HTTP headers (using developer tools to capture what is sent). No luck! Anyone have ideas ...
URI:
https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22AAPL%22)>&env=store://datatables.org/alltableswithkeys
cURL returns this:
<?xml version="1.0" encoding="UTF-8"?>
<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="1" yahoo:created="2017-09-17T00:03:06Z" yahoo:lang="en-US"><results><stock symbol="ktos"/></results></query><!-- total: 8 -->
Browsers return this:
<?xml version="1.0" encoding="UTF-8"?>
<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="1" yahoo:created="2017-09-17T00:00:44Z" yahoo:lang="en-US"><results><quote symbol="AAPL"><Ask>160.10</Ask><AverageDailyVolume>27056300</AverageDailyVolume><Bid>160.00</Bid><AskRealtime/><BidRealtime/><BookValue>25.61</BookValue><Change_PercentChange>+1.60 - +1.01%</Change_PercentChange><Change>+1.60</Change><Commission/><Currency>USD</Currency><ChangeRealtime/><AfterHoursChangeRealtime/><DividendShare>2.52</DividendShare><LastTradeDate>9/15/2017</LastTradeDate><TradeDate/><EarningsShare>8.81</EarningsShare><ErrorIndicationreturnedforsymbolchangedinvalid/><EPSEstimateCurrentYear>9.01</EPSEstimateCurrentYear><EPSEstimateNextYear>10.95</EPSEstimateNextYear><EPSEstimateNextQuarter>3.84</EPSEstimateNextQuarter><DaysLow>158.00</DaysLow><DaysHigh>160.97</DaysHigh><YearLow>104.08</YearLow><YearHigh>164.94</YearHigh><HoldingsGainPercent/><AnnualizedGain/><HoldingsGain/><HoldingsGainPercentRealtime/><HoldingsGainRealtime/><MoreInfo/><OrderBookRealtime/><MarketCapitalization>825.82B</MarketCapitalization><MarketCapRealtime/><EBITDA>70.21B</EBITDA><ChangeFromYearLow>55.80</ChangeFromYearLow><PercentChangeFromYearLow>+53.61%</PercentChangeFromYearLow><LastTradeRealtimeWithTime/><ChangePercentRealtime/><ChangeFromYearHigh>-5.06</ChangeFromYearHigh><PercebtChangeFromYearHigh>-3.07%</PercebtChangeFromYearHigh><LastTradeWithTime>4:00pm - <b>159.88</b></LastTradeWithTime><LastTradePriceOnly>159.88</LastTradePriceOnly><HighLimit/><LowLimit/><DaysRange>158.00 - 160.97</DaysRange><DaysRangeRealtime/><FiftydayMovingAverage>158.97</FiftydayMovingAverage><TwoHundreddayMovingAverage>149.42</TwoHundreddayMovingAverage><ChangeFromTwoHundreddayMovingAverage>10.46</ChangeFromTwoHundreddayMovingAverage><PercentChangeFromTwoHundreddayMovingAverage>+7.00%</PercentChangeFromTwoHundreddayMovingAverage><ChangeFromFiftydayMovingAverage>0.91</ChangeFromFiftydayMovingAverage><PercentChangeFromFiftydayMovingAverage>+0.57%</PercentChangeFromFiftydayMovingAverage><Name>Apple Inc.</Name><Notes/><Open>158.47</Open><PreviousClose>158.28</PreviousClose><PricePaid/><ChangeinPercent>+1.01%</ChangeinPercent><PriceSales>3.66</PriceSales><PriceBook>6.18</PriceBook><ExDividendDate>8/10/2017</ExDividendDate><PERatio>18.15</PERatio><DividendPayDate>8/17/2017</DividendPayDate><PERatioRealtime/><PEGRatio>1.45</PEGRatio><PriceEPSEstimateCurrentYear>17.74</PriceEPSEstimateCurrentYear><PriceEPSEstimateNextYear>14.60</PriceEPSEstimateNextYear><Symbol>AAPL</Symbol><SharesOwned/><ShortRatio>1.90</ShortRatio><LastTradeTime>4:00pm</LastTradeTime><TickerTrend/><OneyrTargetPrice>172.35</OneyrTargetPrice><Volume>49114602</Volume><HoldingsValue/><HoldingsValueRealtime/><YearRange>104.08 - 164.94</YearRange><DaysValueChange/><DaysValueChangeRealtime/><StockExchange>NMS</StockExchange><DividendYield>1.59</DividendYield><PercentChange>+1.01%</PercentChange></quote></results></query><!-- total: 17 -->