def loadLineups(self, country, postalCode): """ Fetch lineup/channel data from silicondust.com and generate a list of Lineup objects. XML structure is: <LineupUIResponse> <Location>US:78750</Location> <Lineup> <DisplayName>Digital Antenna: Austin, TX, 78750</DisplayName> <DatabaseID>2252478</DatabaseID> <Program> ... channel info </Program> </Lineup> </LineupUIResponse> """ lineupUrl = 'http://www.silicondust.com/hdhomerun/lineup_web/%s:%s' % ( country.abbrev, postalCode ) Log( "LOAD LINEUPS URL: %s" % lineupUrl ) responseXml = XML.ElementFromURL( lineupUrl ) location = Util.XPathSelectOne( responseXml, '/LineupUIResponse/Location') Log( "LOCATION %s" % location ) for lineupItemXml in responseXml.xpath('/LineupUIResponse/Lineup'): lineup = Lineup.fromXml( lineupItemXml ) self.append( lineup )
def loadLineups(self, country, postalCode): """ Fetch lineup/channel data from silicondust.com and generate a list of Lineup objects. XML structure is: <LineupUIResponse> <Location>US:78750</Location> <Lineup> <DisplayName>Digital Antenna: Austin, TX, 78750</DisplayName> <DatabaseID>2252478</DatabaseID> <Program> ... channel info </Program> </Lineup> </LineupUIResponse> """ lineupUrl = 'http://www.silicondust.com/hdhomerun/lineup_web/%s:%s' % ( country.abbrev, postalCode) Log("LOAD LINEUPS URL: %s" % lineupUrl) responseXml = XML.ElementFromURL(lineupUrl) location = Util.XPathSelectOne(responseXml, '/LineupUIResponse/Location') Log("LOCATION %s" % location) for lineupItemXml in responseXml.xpath('/LineupUIResponse/Lineup'): lineup = Lineup.fromXml(lineupItemXml) self.append(lineup)
def NewMyLineupList( channel ): Log( "NewMyLineupList ..." ) lineupList = [] lineupList.append( Lineup.getMyLineup( channel )) return lineupList
def NewMyLineupList(channel): Log("NewMyLineupList ...") lineupList = [] lineupList.append(Lineup.getMyLineup(channel)) return lineupList
battleDate.append(extractDate(a)); battleHome = extractHome(a); #for i in range(len(battleHome)): #print "Home: ", battleHome[i]; battleScore = extractScore(a); #for i in range(len(battleScore)): # print "Score: ", battleScore[i]; battleLinks = extractLinks(a); #for i in range(len(battleLinks)): # print "Link: ", battleLinks[i]; battleAway = extractAway(a); #for i in range(len(battleAway)): # print "Away: ", battleAway[i]; #writeCSV(battleDate, battleHome, battleScore, battleAway); Lineup.main_1(battleLinks, battleHome, battleAway); page = int(page); page = page + 15; # num = page % 100; # numMonth = page % 10000; # if num >= 40: # page = page - 48 + 100; # if numMonth >= 1300: # page = page - 1308 + 10000; # except urllib2.HTTPError, error: # print "error\n", page; # html = error.read(); # soup = BeautifulSoup(html); # print(soup.prettify()); # page = int(page); # page = page + 16;
def NewMyLineupList(channel): lineup_List = [] lineup_List.append(Lineup.getMyLineup(channel)) return lineup_List
def NewMyLineupList( channel ): lineup_List = [] lineup_List.append( Lineup.getMyLineup( channel )) return lineup_List