demo.py 711 B

123456789101112131415161718192021222324252627
  1. # -*- coding: utf-8 -*-
  2. # @Author: wangkun
  3. # @Time: 2022/11/23
  4. import time
  5. from main.feishu_lib import Feishu
  6. class Demo:
  7. @classmethod
  8. def get_sheet(cls, log_type, crawler, sheetid):
  9. sheet = Feishu.get_values_batch(log_type, crawler, sheetid)
  10. print(sheet)
  11. @classmethod
  12. def publish_time(cls):
  13. time1 = '发布时间:2022年11月20日'
  14. time2 = time1.replace('发布时间:', '').replace('年', '/').replace('月', '/').replace('日', '')
  15. print(time2)
  16. time3 = int(time.mktime(time.strptime(time2, "%Y/%m/%d")))
  17. print(time3)
  18. if __name__ == '__main__':
  19. Demo.get_sheet('demo', 'haokan', '7f05d8')
  20. # Demo.publish_time()
  21. pass