@@ -150,7 +150,7 @@ def pout (self, pstr, log_type='none',printOut = True, func = False):
150150br = None #browser global
151151gridHours = 0
152152loggedinMatchZ = 0
153- loggedinStr = '.*Logout of your Zap2it account .*'
153+ loggedinStr = '.*Logout of your.*'
154154programs = {}
155155cp = None
156156stations = {}
@@ -341,9 +341,12 @@ def on_td (self, tag, attrs):
341341 if cp != - 1 and "-D" in options :
342342 fn = os .path .join (cacheDir ,cp + ".js.gz" )
343343 if not os .path .isfile (fn ):
344- data = getURL (urlRoot + "gridDetailService?pgmId=" + cp )
345- if data : #sometimes we fail to get the url try to keep going
346- wbf (fn , data )
344+ try :
345+ data = getURL (urlRoot + "gridDetailService?pgmId=" + cp )
346+ if data : #sometimes we fail to get the url try to keep going
347+ wbf (fn , data )
348+ except :
349+ pass
347350 if os .path .isfile (fn ):
348351 log .pout ("[D] Parsing: " + cp ,'info' )
349352 parseJSOND (fn )
@@ -1224,23 +1227,22 @@ def incXML (st, en, fh):
12241227def sortChan (a ,b ):
12251228 global stations
12261229 p = re .compile ("\d+\.\d+" )
1227- if "order" in stations [a ] and "order" in stations [b ]:
1228- ma = p .search (stations [a ]["order" ])
1229- mb = p .search (stations [b ]["order" ])
1230- tmp = float (ma .group ()) - float (mb .group ())
1231- if tmp < 0.00 :
1232- return - 1
1233- if tmp == 0.00 :
1234- return 0
1235- if tmp > 0.00 :
1236- return 1
1237- else :
1238- if stations [a ]["name" ] < stations [b ]["name" ]:
1239- return - 1
1240- if stations [a ]["name" ] == stations [b ]["name" ]:
1241- return 0
1242- if stations [a ]["name" ] > stations [b ]["name" ]:
1243- return 1
1230+ # if "order" in stations[a] and "order" in stations[b]:
1231+ # ma = p.search(stations[a]["order"])
1232+ # mb = p.search(stations[b]["order"])
1233+ # tmp = float(ma.group()) - float(mb.group())
1234+ # if tmp < 0.00:
1235+ # return -1
1236+ # if tmp == 0.00:
1237+ # return 0
1238+ # if tmp > 0.00:
1239+ # return 1
1240+ if stations [a ]["name" ] < stations [b ]["name" ]:
1241+ return - 1
1242+ if stations [a ]["name" ] == stations [b ]["name" ]:
1243+ return 0
1244+ if stations [a ]["name" ] > stations [b ]["name" ]:
1245+ return 1
12441246
12451247def hex2dec_e (matchObj ):
12461248 return "%s%d%s" % ('&#' ,ord (matchObj .group (1 )),';' )
0 commit comments