Using Tasker to pull sports scores?

471 views
Skip to first unread message

Chris Boerma

unread,
May 5, 2014, 12:56:37 PM5/5/14
to tas...@googlegroups.com
Kind of an off the wall question here...

I had to send my Pebble off for a replacement because my vibration motor stopped working.  While this is happening I pulled out my old MetaWatch.  Now, there's a lot of love about the MetaWatch, but Pebble beats it in most areas of functionality.  I think MetaWatch is just too closed right now... no one seems to be doing any developing for it (at least on the Android side).

However, one VERY nice thing that the Meta has: Sports Scores.  I've got a widget running on it that will show the current status of the Detroit Tigers game.  I can just glance any time (driving, walking through the mall with my wife, whatever...) and see the current score and inning.

There does not appear to be a Pebble alternative for this yet.  I know there are plenty of programs or options out there to be updated when a team scores or even whenever an inning ends, but this isn't the same as having it displayed right on your wrist whenever you want/need.  But it got me to wondering about using Glance and Tasker to do this.  Glance (which I highly recommend) is a nice app that I can use to customize the watch face.  It also have three tasker text field inputs.  I'm using one of them right now to push text to my watch showing the volume state the phone is in.  

If I could find away to get the scores into tasker, then it would be pretty simple to push these to the watch and setup a custom watch face in Glance to display it.  But the hard part is getting the values into tasker.  Has anyone ever done anything like this?  I'd basically need tasker to go out to some webservice and pull the scores and team names... but of course it also has to select the right game.  Probably more than something Tasker is designed to do, but just thought I'd ask.

Brandon Horwath

unread,
May 5, 2014, 4:17:53 PM5/5/14
to tas...@googlegroups.com
It's possible, the toughest part might be trying to not only find an online database updated with your desired information but then parsing out the desired input.

Try and see if http get can pull info off a sports score website or rss feed. If so, it might be possible.

Ben Graham

unread,
May 5, 2014, 11:02:43 PM5/5/14
to tas...@googlegroups.com
I'm actually working with the same kind of deal on another post! I used this guide to get an understanding of how to pull info off of websites: http://www.pocketables.com/2012/09/beginners-guide-to-tasker-part-4-variable-data-processing.html
It basically says use HTTP Get to save the website info in html format as a variable, then use variable splitters (whichever splitter values seem to look the best) to get (in the example case) the article's link.

I'm sure you can use this same process to narrow a live sports feed website down to just the score as a variable, and then display that variable on the watch. You'll have to set the task to update maybe once per minute so it stays current though because it won't update itself automatically as the website does.

Ben Graham

unread,
May 5, 2014, 11:23:49 PM5/5/14
to tas...@googlegroups.com
As for finding the right game, use HTTP Get on whatever page shows the list of current games, then use the variable split process above to get the links and titles of each game alone. Once you have that set, you could create a scene or widget on your phone that shows all the possible games, and when you click one that you want to follow, it will run a task that saves that game's link to a variable let's say %GAME. Now you must split %GAME into two parts (I suggest using the splitter value .com): %GAME1 consisting of most of the Server Port, which is just the main page of the website (ex. www.google.com) -- we can consider this garbage in this case since it will always be the same so feel free to delete this variable -- and %GAME2 which is the Path, which is everything after the main page of the website (on this page, https://groups.google.com/forum/#!topic/tasker/G23oKPD0bBY , the path would be forum/#!topic/tasker/G23oKPD0bBY);

That sounds pretty complicated so far tbh, but if all that worked out you should have a widget or scene on your device that lets you choose which of the current page of live games you want to follow. After choosing a game you'll run an action HTTP Get with Server Port: *main website* (ex. www.espn.com) and Path: %GAME2 so that you have the html code of just that one game. Now you would just split the html as mentioned above and in the article so that you just have the team names and the scores (and I suppose the time in some difficult way...) as variables. If you're at this point then hopefully you can send these variables to be displayed on your watch.

So in an ideal world (assuming all of that mess above actually goes well) you'll be able to choose your game from your phone and follow it from your watch.

Jeremy Harris

unread,
May 5, 2014, 11:35:22 PM5/5/14
to tas...@googlegroups.com
I can't believe this is the first thread I'm reading tonight. I just finished changing my SayWeather and SayNews tasks from using SQL to HTTP GET and have been looking for a good sports site to make a sports task.

If I find a good source I'll post it for ya, but I've checked all the local Philly sports sites and mlb.com and have yet to find good info displayed on one page.

Once you get the source it's pretty straight forward.

Ben Graham

unread,
May 5, 2014, 11:44:00 PM5/5/14
to tas...@googlegroups.com
Sorry for multiple posts, just a quick update that a simple google search gave me high hopes!

I went to CBSSports.com and into NBA where two games were shown - one complete and one in progress. The numbers look VERY easy to grab in their formatting. You would just use HTTP Get to save the html and then two good splitters I found were "finalScore" (Including quotation marks) for a close cut to current score and "gameStatus" to get near the time left in the game. They both appeared less than 6 times in the whole page, so they are reliable splitters. A splitter for team name may change depending on the sport, so I'll let you handle that. :)

Jeremy Harris

unread,
May 6, 2014, 3:39:21 PM5/6/14
to tas...@googlegroups.com
Cool, I'll check that site out tonight.

Chris Boerma

unread,
May 18, 2014, 7:35:44 PM5/18/14
to tas...@googlegroups.com
For what it's worth, I found this app for Pebble:

Does everything I was looking for and then some.  Perfect for what I was needing.

Milan Roubal

unread,
May 26, 2014, 12:40:09 PM5/26/14
to tas...@googlegroups.com
I am using SofaScore to get the scores and Notification Center for Pebble to get each change of score to Pebble. The goal for me is now to try to catch the notification by Tasker and send it to Pebble TaskWatch to have it all the time visible, but I was not successful so far with it. If anybody find out how to catch notifications from SofaScore via Tasker, please let me know.

Dne pondělí, 5. května 2014 18:56:37 UTC+2 Chris Boerma napsal(a):

luigi bettelli

unread,
Nov 7, 2016, 5:47:25 PM11/7/16
to Tasker
Hello.
Writing back to this old thread cause I wanto to something similiar:
I'm using Flash Score for sport results but despite giving me quick notifications for every goal it doesn't give me the scorer.
How can I find them using Tasker?
I've read you were talking about HTTP get but I have no idea of how it works, so I'll be pleased if you explain me clearly what I have to do.
Thanks!
Reply all
Reply to author
Forward
0 new messages