def semanal_TW(): try: dfcampanas = medios.Spreadsheet(db.TWS['key'], db.TWS['media'], db.TWS['campanas']) medios.cuentas(dfcampanas, db.TWS['media'], conn) medios.campanas(dfcampanas, db.TWS['media'], conn) medios.metricas_campanas(dfcampanas, db.TWS['media'], conn, 'week') except Exception as e: print(e)
def semanal_ADF(): try: dfcampanas = medios.Spreadsheet(db.AFS['key'], db.AFS['media'], db.AFS['campanas']) medios.cuentas(dfcampanas, db.AFS['media'], conn) #medios.campanas(dfcampanas, db.AFS['media'], conn) #medios.metricas_campanas(dfcampanas, db.AFS['media'], conn,'week') except Exception as e: print('Error on line {}'.format(sys.exc_info()[-1].tb_lineno), type(e).__name__, e)
def semanal_FB(): try: dfcampanas = medios.Spreadsheet(db.FB['key'], db.FB['media'], db.FB['campanas']) dfadsets = medios.Spreadsheet(db.FB['key'], db.FB['media'], db.FB['adsets']) dfads = medios.Spreadsheet(db.FB['key'], db.FB['media'], db.FB['ads']) medios.cuentas(dfcampanas, db.FB['media'], conn) medios.campanas(dfcampanas, db.FB['media'], conn) medios.metricas_campanas(dfcampanas, db.FB['media'], conn, 'hour') medios.metricas_adsets(dfadsets, db.FB['media'], conn, 'hour') medios.metricas_ads(dfads, db.FB['media'], conn, 'hour') except Exception as e: print(e)