3

This is absolutely ridiculous that something so simple is rendered so difficult. As far as I can tell having tried multiple examples, Yahoo doesn't follow the same OAuth conventions that most of the existing C# libraries do so for example, the Google implementation won't work and neither will many of the other examples I found online.

All I want to do is make a simple query for Yahoo stats data. This data is publicly accessible so there is no need for any kind of 3-legged handshake, a simple 2-legged model should work but does not. I found this example: http://andy.edinborough.org/C-OAuth-Implementation/ which looked like a really promising lightweight solution but if it once worked it no longer does, I get "400-Bad Request" no matter what I try.

Has anybody successfully implemented this in Java or C#, I just want to pull back stats for a given player (e.g. give me Aaron Rodgers stats for this season).

snappymcsnap
  • 2,050
  • 2
  • 29
  • 53
  • Did you ever find a way of doing this? I noticed I can log in and run commands in the YQL but having massive difficulty with getting data for my app. – dave317 May 15 '17 at 03:15
  • @dave317 No sorry, I lost all patience with it and just wrote a scraper to scrape the stats I needed. – snappymcsnap May 15 '17 at 13:19
  • Thanks, that sounds like it might work for me as well. Going to investigate today. Did you scrape the data from Yahoo or another source?. – dave317 May 15 '17 at 15:02
  • Can you tell me how you scraped the data? Are you using the Consumer Key and Consumer Secret somehow? Or are you just using a prebuilt Yahoo Oauth library? (Or both). I have something that will read XML data from an alternate FF site but I would like to read the Yahoo XML data if possible... – dave317 May 15 '17 at 18:51
  • @dave317 No I went old school and screen scraped the raw HTML pages (HTMLAgilityPack is your friend). The downside to this is they change things every year or two so you might have to re-code it a bit, so plan for that and write it to be flexible. I last did it for NHL stats but any sport should be similar. Simply find the sortable stats for all players, like this: https://sports.yahoo.com/nhl/stats/byposition?pos=C,RW,LW,D then it's usually best to find the header row so you can identify what each column is and then map the numbers to players. Works pretty well when you get the hang of it – snappymcsnap May 15 '17 at 19:57
  • Last year I used this site's (https://fantasydata.com/products/real-time-sports-data-api.aspx) free version of their API. The numbers (scores, points, etc) aren't totally accurate on the free version, but it worked. I might end up using that again rather than scrape the data. Its super unfortunate, the Yahoo API SEEMS like it should work great. – dave317 May 15 '17 at 20:01

0 Answers0