update_kw.py 475 B

1234567891011121314
  1. import dataset
  2. db = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/seo?charset=utf8mb4')
  3. table=db['seo_nton_custkw']
  4. cust = "The Icons_ZH"
  5. kw = ['壯世代之春','壯世代','高齡解放','高齡解放運動','高齡化','少子化','戰國策 吳春城','戰國策 董事長','Strong Generation','政府社會責任']
  6. print(cust, kw)
  7. for k in kw:
  8. if k != "" and cust != "":
  9. table.insert({'cust':cust,'kw':k})
  10. else:
  11. print("Empty data")