home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
My Score Center - version 2.12.0.0 - 4 May 2014 (for MP 1.6/1.7)
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="FredP42" data-source="post: 654146" data-attributes="member: 91354"><p><strong>Re: My Score Center - version 1.2 - 22 Aug 2010</strong></p><p></p><p></p><p></p><p>Hello,</p><p>I already put the college football ranking, I hope those are still working (seems to me).</p><p></p><p>For the two pages you want to add, the second one is easier to start, because it is obvious it is a table.</p><p>Here is how I proceed:</p><p>* open the page and open the source (ctr+U in firefox)</p><p>* search something from the table, for example the header: AP Top 25, the second occurrence is the good one.</p><p>* find the table tag and look if you have an id or a class attribute. Here we have class = 'tablehead'</p><p>=> so the good XPath expression is //table[@class='tablehead'] and since there are many tables put 0 in the XPath Element field for the first table, 1 for the second ... Once you have created the first score, just copy it and the just change the element.</p><p></p><p></p><p>The first page is trickier because there is no table, instead the page contains div, span and p tags. It is possible to parse this : here there is a different class for the visitor and the home team, the expression is (the pipe | allows to concatenate expressions):</p><p>//div[@class='team visitor'] | //div[@class='team home']</p><p></p><p>Maybe there is a better expression, in fact I don't know if this one will give you the results correctly because there aren't any scores yet. It displays '#187' in the text, to remove that you can add a rule:</p><p>* column = 0 (for all columns),</p><p>* operator = contains,</p><p>* value = #187; (to replace #187 by nothing, the ';' separates the searched string from the replaced string, nothing here)</p><p>* action = replace</p><p>* style = leave empty</p><p></p><p>It is not pretty so you can add some formatting with a second rule to change the color of the odd lines</p><p>* column = -1 ( = row number)</p><p>* operator = modulo</p><p>* value = 2</p><p>* action = format line</p><p>* style = any style </p><p></p><p></p><p>To finish, it is not possible for now to choose the sorting or the week, that's why you have to use <a href="http://scores.espn.go.com/ncf/scoreboard" target="_blank">NCAA College Football Scores, College Football Scores, NCAA Football Scoreboard and Results - ESPN</a> for the address.</p><p>I already though of the possibility to set the address like this http://scores.espn.go.com/ncf/scoreboard?seasonYear={yyyy}&seasonType=2&weekNumber={week:1-15} so that you can navigate through week one to 15.</p><p></p><p>In fact it is already done for the year, if you put {yyyy} it will be replaced by 2010 and next year by 2011.</p><p></p><p>I hope I was not too long and clear enough to let you try more stuff (in case you find another web site giving the results in an easier way to parse <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" />)</p><p></p><p>Here is the export file, you can re-import in your configuration. Note that in some cases the import crashed the configuration dialog. In this case open the XML, copy everything between <Scores> and </Scores> (but not those tags) and paste it to your settings file (Program Data\Team Media Portal\MediaPortal\MyScoreCenter.Settings.xml) before the </Scores> tag.</p></blockquote><p></p>
[QUOTE="FredP42, post: 654146, member: 91354"] [b]Re: My Score Center - version 1.2 - 22 Aug 2010[/b] Hello, I already put the college football ranking, I hope those are still working (seems to me). For the two pages you want to add, the second one is easier to start, because it is obvious it is a table. Here is how I proceed: * open the page and open the source (ctr+U in firefox) * search something from the table, for example the header: AP Top 25, the second occurrence is the good one. * find the table tag and look if you have an id or a class attribute. Here we have class = 'tablehead' => so the good XPath expression is //table[@class='tablehead'] and since there are many tables put 0 in the XPath Element field for the first table, 1 for the second ... Once you have created the first score, just copy it and the just change the element. The first page is trickier because there is no table, instead the page contains div, span and p tags. It is possible to parse this : here there is a different class for the visitor and the home team, the expression is (the pipe | allows to concatenate expressions): //div[@class='team visitor'] | //div[@class='team home'] Maybe there is a better expression, in fact I don't know if this one will give you the results correctly because there aren't any scores yet. It displays '#187' in the text, to remove that you can add a rule: * column = 0 (for all columns), * operator = contains, * value = #187; (to replace #187 by nothing, the ';' separates the searched string from the replaced string, nothing here) * action = replace * style = leave empty It is not pretty so you can add some formatting with a second rule to change the color of the odd lines * column = -1 ( = row number) * operator = modulo * value = 2 * action = format line * style = any style To finish, it is not possible for now to choose the sorting or the week, that's why you have to use [url=http://scores.espn.go.com/ncf/scoreboard]NCAA College Football Scores, College Football Scores, NCAA Football Scoreboard and Results - ESPN[/url] for the address. I already though of the possibility to set the address like this http://scores.espn.go.com/ncf/scoreboard?seasonYear={yyyy}&seasonType=2&weekNumber={week:1-15} so that you can navigate through week one to 15. In fact it is already done for the year, if you put {yyyy} it will be replaced by 2010 and next year by 2011. I hope I was not too long and clear enough to let you try more stuff (in case you find another web site giving the results in an easier way to parse :D) Here is the export file, you can re-import in your configuration. Note that in some cases the import crashed the configuration dialog. In this case open the XML, copy everything between <Scores> and </Scores> (but not those tags) and paste it to your settings file (Program Data\Team Media Portal\MediaPortal\MyScoreCenter.Settings.xml) before the </Scores> tag. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
My Score Center - version 2.12.0.0 - 4 May 2014 (for MP 1.6/1.7)
Contact us
RSS
Top
Bottom