#!/usr/bin/python3
# -*- coding: utf-8 -*-

import datetime
import time
import requests
import json

github_url = "http://192.168.1.70:8080/robot/messageServlet2"

data = json.dumps({'name': 'test', 'phone': 139})

url = 'http://192.168.1.70:8080/robot/messageServlet2'
# r = requests.post(url, data={'name': 'test', 'phone': 'some test repo'})

while 1:
    now = datetime.datetime.now()
    now_str = now.strftime('%Y/%m/%d %H:%M:%S')[11:]
    print('\r{}'.format(now_str), end='')
    r = requests.post(url, data={'name': 'test', 'phone': 139, 'content': '内容'})
    print(r.text.data)
    time.sleep(1)

print("结束")

 

相关文章:

  • 2021-08-28
  • 2021-12-05
  • 2022-12-23
  • 2021-04-13
  • 2021-11-19
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-07
  • 2021-11-17
  • 2021-11-17
  • 2021-12-04
相关资源
相似解决方案