Sub Menu
Supporting
If you like MediaPortal please support it by making a small donation:
Awards
|
Home Plugins + Extensions
Sport Score RSS Feed Download
- Description:
-
Description:
This is a perl script that runs from a webserver and webscrapes the current sports scores from Yahoo! Sports and
creates a RSS feed compatible with My News. In addition to the scores of the games, the feed contains the preview article
(for live games and games that haven't started) or recap article (completed games) if available.
The script currently should work for NFL, MLB, NBA, NHL, and NCAAF.
Future Features (if people want):
Eliminate need for web server [ Manual update or background task that updates every 15 min?]
Other sports
Requirements:
1) ActivePerl
Perl is a great scripting language!
2) Date::Manip Module for perl
Simple install instructions:
a) Download at http://search.cpan.org/CPAN/authors/id/S/SB/SBECK/DateManip-5.44.tar.gz
b) Create folder: C:\Perl\site\lib\Date
c) Extract Manip.pm to C:\Perl\site\lib\Date
3) A running webserver with permissions to create/delete/modify files and folders
Best bet is running IIS on your HTPC or some other trusted PC on your network
Installation:
1) Extract sports.pl, sports.config, and yahoosports.bmp to you web server
2) Make sure your web server permits the running of scripts
3) Edit sports.config to your webserver's address [http:\\localhost\] works if its running on port 80 of your HTPC.
4) Add the RSS feed to MyNews [ie. http:\\localhost\sports.pl?sport=NFL]
Note: Sports abbreviations are the ones that Yahoo! Sports uses [MLB, NFL, NBA, NHL, NCAAF]
Optional:
The script supports saving past games ( 2 weekends of games for NFL/NCAAF, 4 days of games for the rest ).
This feature is only effective if the script is run every day.
[The RSS feed by itself will only do the games for that day for MLB, NBA, and NHL. A week for the NFL and NCAAF]
5) Create a .bat file that will run the script every morning
The file should resemble the following:
cd C:\Inetpub\wwwroot\
sports.pl NFL
sports.pl NCAAF
sports.pl NHL
sports.pl MLB
The cd at the beginning is required, C:\Inetpub\wwwroot\sports.pl NFL will not work properly.
6) Set a scheduled task to run the .bat file every morning.
It should run sometime between the time games finish, and the time Yahoo! sports starts reporting on the
next days games. ( ~2am - 6am should work fine )
- Submitted On:
-
06 Nov 2006
- Submitted By:
-
paco83 (paco83)
- File Date:
-
06 Nov 2006
- File Author:
-
Brian
- File Version:
-
1.0
- File Size:
-
6.67Kb
- File Type:
-
zip
- Downloads:
-
1045
- Rating:
-
 Total Votes:0
-
Be the first to comment! Please sign in or register.
|
|
|
|
Most downloaded in last 7 days |
|
|
|
|
|