import n_gram
import rec10d
import ts2epg
-import xml2db
+import xml2db_dom
import configreader
import recdblist
path = str(os.path.dirname(os.path.abspath(__file__))) + "/"
dt = dt.days * 24 * 60 + dt.seconds
if dt > 2 * 60 * 60:
ts2epg.write(tmppath + chtxt + "epgdata.xml", chdb.chtxtsearch(chtxt)['ch'])
- xml2db.xml2db(tmppath + chtxt + "epgdata.xml", chdb.chtxtsearch(chtxt)['bctype'])
+ xml2db_dom.xml2db_dom(tmppath + chtxt + "epgdata.xml", chdb.chtxtsearch(chtxt)['bctype'])
def updatebc(bctype):
bctypel = chdb.bctypesearch(bctype)
print bctype
try:
ts2epg.write(tmppath + bctype + "epgdata.xml", chdb.bctypesearch(bctype)['ch'])
- xml2db.xml2db(tmppath + bctype + "epgdata.xml", bctype)
+ xml2db_dom.xml2db_dom(tmppath + bctype + "epgdata.xml", bctype)
shutil.copyfile(tmppath + bctype + "epgdata.xml", tmppath + bctype + "epgdata.bak.xml")
rec10d.rec10db.update_by_bctype_epg_ch(bctype)
except Exception, inst:
print "error occurs in updatebc(epgdb)"
print type(inst)
print inst
- xml2db.xml2db(tmppath + bctype + "epgdata.bak.xml", bctype)
+ xml2db_dom.xml2db_dom(tmppath + bctype + "epgdata.bak.xml", bctype)
rec10d.rec10db.update_status_by_bctype_epg_ch(bctype, "2")
def updatebc_bak(bctype):
"""
update epg data by .bak file
"""
- xml2db.xml2db(tmppath + bctype + "epgdata.bak.xml", bctype)
+ xml2db_dom.xml2db_dom(tmppath + bctype + "epgdata.bak.xml", bctype)
def searchtime2(titletxt, timet, deltatime, chtxt):
time = datetime.datetime.strptime(timet, "%Y-%m-%d %H:%M:%S")
ret = []