gen_index_columns.py 779 B

12345678910111213141516171819
  1. import os
  2. from typing import Optional
  3. from dataset.util import ResultIter
  4. from datetime import tzinfo
  5. import datetime
  6. import mysql.connector
  7. from mysql.connector import Error
  8. import dataset
  9. import json
  10. from pytube import extract
  11. import requests
  12. import json
  13. a=requests.get('https://m3.hhh.com.tw:18670/gen_request_columns')
  14. d=a.json()
  15. with open('../json/index_columns.json','w+',encoding="utf-8") as f:
  16. json.dump(d, f)
  17. cmd="""curl -X POST "https://api.cloudflare.com/client/v4/zones/8cb58022ad5743cfd9f088d5e3a261eb/purge_cache" -H "X-Auth-Email: web.dept.hhh@gmail.com" -H "X-Auth-Key:63e51d9a1638d66afcbfc3320aabec52304de" -H "Content-Type: application/json" --data '{"files":["https://hhh.com.tw/hhh-test/calculator_request/json/index_columns.json"]}'"""
  18. os.system(cmd)