def est_cdc(conp, data, **args): data = data.copy() for w in data: m = web() setting = { "url": w[1], "f1": w[3], "f2": w[4], "tb": w[0] + "_cdc", "col": w[2], "conp": conp, "num": 4, "total": 10, "headless": True } if "num" in args.keys(): setting["num"] = args["num"] if "cdc_total" in args.keys(): setting["total"] = args["cdc_total"] setting = {**setting, **args} if "diqu" in args.keys(): diqu = args["diqu"] else: diqu = "未知" m.write(**setting) cdc_sql(conp, w[0]) gg_cdc(conp, diqu)
def est_tables(conp, data, headless=True): data = data.copy() for w in data: setting = { "url": w[1], "f1": w[3], "f2": w[4], "tb": w[0], "col": w[2], "conp": conp, "num": 10, "headless": headless } m = web() m.write(**setting)
def work(conp, data, diqu, i=-1, headless=True): data = data.copy() if i == -1: data = data else: data = data[i:i + 1] for w in data: setting = { "url": w[1], "f1": w[3], "f2": w[4], "tb": w[0], "col": w[2], "conp": conp, "num": 10, "headless": headless } m = web() m.write(**setting)
def est_tbs(conp, data, **args): data = data.copy() for w in data: m = web() setting = { "url": w[1], "f1": w[3], "f2": w[4], "tb": w[0], "col": w[2], "conp": conp, "num": 10, "headless": True } if "num" in args.keys(): setting["num"] = args["num"] if "total" in args.keys(): setting["total"] = args["total"] if "headless" in args.keys(): setting["headless"] = args["headless"] setting = {**setting, **args} m.write(**setting)
def cdc(conp, data, diqu, i=-1, headless=True): data = data.copy() if i == -1: data = data else: data = data[i:i + 1] for w in data: setting = { "url": w[1], "f1": w[3], "f2": w[4], "tb": w[0] + "_cdc", "col": w[2], "conp": conp, "num": 4, "total": 10, "headless": headless } m = web() m.write(**setting) cdc_sql(conp, w[0]) gg_cdc(conp, diqu)