Awesome. figured out the escaped string and have all my menus populating.
For those interested, here is what I currently have:
<br />
# PMS plugin framework<br />
from PMS import *<br />
from PMS.Objects import *<br />
from PMS.Shortcuts import *<br />
import re, string, datetime<br />
######<br />
#TODO: <br />
# 'Country' SubMenu<br />
# 'League' SubMenu<br />
# BOTH?<br />
# Sort (view might need to change so this is intuitive)<br />
# Adjust times to a time-zone preference<br />
######<br />
####################################################################################################<br />
VIDEO_PREFIX = "/video/fromsport"<br />
PAGE_ROOT = "http://www.fromsport.com/"<br />
<br />
FOOTBALL = "http://www.fromsport.com/c-1.html"<br />
HOCKEY = "http://www.fromsport.com/c-3.html"<br />
TENNIS = "http://www.fromsport.com/c-4.html"<br />
BASKETBALL = "http://www.fromsport.com/c-6.html"<br />
BASEBALL = "http://www.fromsport.com/c-7.html"<br />
GOLF = "http://www.fromsport.com/c-8.html"<br />
CYCLING = "http://www.fromsport.com/c-9.html"<br />
MOTORSPORTS = "http://www.fromsport.com/c-10.html"<br />
OTHER = "http://www.fromsport.com/c-11.html"<br />
<br />
NAME = L('Title')<br />
<br />
# make sure to replace artwork with what you want<br />
# these filenames reference the example files in<br />
# the Contents/Resources/ folder in the bundle<br />
ART = 'art-default.png'<br />
ICON = 'icon-default.png'<br />
<br />
####################################################################################################<br />
<br />
def Start():<br />
Plugin.AddPrefixHandler(VIDEO_PREFIX, MainMenu, "FromSport", ICON, ART)<br />
<br />
Plugin.AddViewGroup("InfoList", viewMode = "InfoList", mediaType = "items")<br />
Plugin.AddViewGroup("List", viewMode = "List", mediaType = "items")<br />
<br />
MediaContainer.art = R(ART)<br />
MediaContainer.title1 = NAME<br />
DirectoryItem.thumb = R(ICON)<br />
<br />
def MainMenu():<br />
dir = MediaContainer(viewGroup = "InfoList")<br />
dir.Append(Function(DirectoryItem(VideoPage,"HOME",subtitle = "",summary = "",thumb = R(ICON),art = R(ART)),pageUrl = PAGE_ROOT))<br />
dir.Append(Function(DirectoryItem(VideoPage,"Football",subtitle = "GOOOOOAAAAAAAAAALLLLLLLLLL!!!!!!",summary = "",thumb = R(ICON),art = R(ART)),pageUrl = FOOTBALL))<br />
dir.Append(Function(DirectoryItem(VideoPage,"Hockey",subtitle = "pucks n' stuff",summary = "",thumb = R(ICON),art = R(ART)),pageUrl = HOCKEY))<br />
dir.Append(Function(DirectoryItem(VideoPage,"Tennis",subtitle = "Ace!",summary = "",thumb = R(ICON),art = R(ART)),pageUrl = TENNIS))<br />
dir.Append(Function(DirectoryItem(VideoPage,"Basketball",subtitle = "at the buzzer....",summary = "",thumb = R(ICON),art = R(ART)),pageUrl = BASKETBALL))<br />
dir.Append(Function(DirectoryItem(VideoPage,"Baseball",subtitle = "Strike 3!",summary = "",thumb = R(ICON),art = R(ART)),pageUrl = BASEBALL))<br />
dir.Append(Function(DirectoryItem(VideoPage,"Golf",subtitle = "FORE!",summary = "",thumb = R(ICON),art = R(ART)),pageUrl = GOLF))<br />
dir.Append(Function(DirectoryItem(VideoPage,"Cycling",subtitle = "Push it",summary = "",thumb = R(ICON),art = R(ART)),pageUrl = CYCLING))<br />
dir.Append(Function(DirectoryItem(VideoPage,"Motorsports",subtitle = "Vroom",summary = "",thumb = R(ICON),art = R(ART)),pageUrl = MOTORSPORTS))<br />
dir.Append(Function(DirectoryItem(VideoPage,"Other",subtitle = "Uhhh..",summary = "",thumb = R(ICON),art = R(ART)),pageUrl = OTHER))<br />
return dir<br />
<br />
def VideoPage(sender, pageUrl):<br />
dir = MediaContainer(title2 = sender.itemTitle)<br />
Log("Scraping " + pageUrl)<br />
content = XML.ElementFromURL(pageUrl, isHTML = True)<br />
<br />
for row in content.xpath('//table//tr'):<br />
#un-escape the team names<br />
teams = row.xpath('./td[@class="list_team"]/a/script')[0].text<br />
teams = teams.replace("document.write(unescape('", "")<br />
teams = teams.replace("'))", "")<br />
teams = String.Unquote(teams)<br />
teams = teams.replace(";", "")<br />
<br />
dateTime = row.xpath('./td[@class="list_date"]')[0].text<br />
sport = row.xpath('./td[@class="list_ball"]/a/img')[0].get('alt')<br />
country = row.xpath('./td[@class="list_flag"]/img')[0].get('alt')<br />
league = row.xpath('./td[@class="list_champ"]')[0].text<br />
vidLink = row.xpath('./td[@class="list_team"]/a')[0].get('href')<br />
sportPic = row.xpath('./td[@class="list_ball"]/a/img')[0].get('src') #TODO - find better picture options<br />
countryPic = row.xpath('./td[@class="list_flag"]/img')[0].get('src')<br />
<br />
title = teams + " (" + league + ")"<br />
subtitle = country + " " + sport + " @ " + dateTime<br />
link = vidLink<br />
thumb = sportPic<br />
<br />
dir.Append(WebVideoItem(link, subtitle = subtitle, title = title, thumb = thumb))<br />
return dir<br />
<br />
<br />
Now on to the site configuration so that they will play.
When I first looked at this site, the videos I looked at all used the same flash plugin. Today, with new videos I'm finding that they may actually be using more than one. Is it possible to set up the site configuration using multiple flash plugins?