exp_id.py 410 B

12345678910111213141516
  1. import dataset
  2. import codecs
  3. import dataset
  4. import json
  5. db = dataset.connect('mysql://hhh7796hhh:lYmWsu^ujcA1@127.0.0.1:13317/xoops?charset=utf8mb4')
  6. db2 = dataset.connect('mysql://choozmo:pAssw0rd@db.ptt.cx:3306/seo?charset=utf8mb4')
  7. table=db2['columnids']
  8. cursor=db.query('SELECT * FROM xoops._hcolumn where datediff(now(),creat_time) < 300')
  9. for c in cursor:
  10. table.insert({'cid':c['hcolumn_id']})