def search_error_company(row): app = db.search_appinfo(row[0]) i = 0 if app is not None: print "i:", i, row dev = Dev(row[0], row[1]) companyList.append(dev) i += 1 for dev in companyList: print dev update_devinfo_simple(dev.company, dev.package, dev.company) break
def update_app_developer(): index = 0 date = utils.getdate() devsList = db.get_specail_devslist(date) print "update_app_developer dev len=", devsList.__len__() for dev in devsList: app = db.search_appinfo(dev.package) if app is not None: db.update_devinfo(dev.company, utils.getdate(), dev.status, app.package, app.company, app.company_link) if cmp(dev.company, app.company) != 0: print "update dev:", index, dev.company, app.package index += 1
def test_update_dev(): app = db.search_appinfo("com.mfa.filemanager") db.update_devinfo(app.company, app.date, "ok", app.package, app.company, app.company_link) db.update_devinfo_company_pkg(app.company, app.date, app.package) db.update_devinfo_simple(app.company, app.date, "ok", app.package)
__author__ = 'houhuihua' import db, utils app = db.search_appinfo("io.makeroid.antonio_aguilar_es.fondos05") if app is not None: status = utils.get_httpstatuscode(app.link.strip('\n')) print "app status:", status
def db_exec_sql(callback, sql): conn = sqlite3.connect('topapps') print sys.argv[1] result = conn.execute(sql) ii = 0 ''' for row in result: ii +=1 if callback is not None: callback(row) else: #print ii, row pass ''' cc = 0 print cc i1 = 0 sameList = [] result3 = [] result2 = conn.execute(sql) for row in result2: result3.append(row[0]) result2 ''' for i in result: i2 = 0 #result2 = conn.execute(sql) for j in result3: if i1 != i2 and cmp(i[0], j) == 0: print "same", cc, i[2] sameList.append(i[2]) cc +=1 i2 += 1 print "ove one" i1 +=1 print "total cc:", cc ''' appsList = [] i = 0 cc = 0 for row in result: app = db.search_appinfo(row[0]) if app is not None: #db.update_devinfo_company_pkg(app.company, app.date, app.package) appsList.append(app) print i, row[0], app.company i += 1 cc += 1 print cc, i conn.commit() conn.close() for app in appsList: print "update", app.company db.update_devinfo_company_pkg(app.company, app.date, app.package)