@@ -150,7 +150,7 @@ def pout (self, pstr, log_type='none',printOut = True, func = False):
150
150
br = None #browser global
151
151
gridHours = 0
152
152
loggedinMatchZ = 0
153
- loggedinStr = '.*Logout of your Zap2it account .*'
153
+ loggedinStr = '.*Logout of your.*'
154
154
programs = {}
155
155
cp = None
156
156
stations = {}
@@ -341,9 +341,12 @@ def on_td (self, tag, attrs):
341
341
if cp != - 1 and "-D" in options :
342
342
fn = os .path .join (cacheDir ,cp + ".js.gz" )
343
343
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
347
350
if os .path .isfile (fn ):
348
351
log .pout ("[D] Parsing: " + cp ,'info' )
349
352
parseJSOND (fn )
@@ -1224,23 +1227,22 @@ def incXML (st, en, fh):
1224
1227
def sortChan (a ,b ):
1225
1228
global stations
1226
1229
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
1244
1246
1245
1247
def hex2dec_e (matchObj ):
1246
1248
return "%s%d%s" % ('&#' ,ord (matchObj .group (1 )),';' )
0 commit comments