notify_tests.py 643 B

123456789101112131415161718192021
  1. from bs4 import BeautifulSoup
  2. import requests
  3. import time
  4. #h7QtBUeJLTrYOY89sMqgNEKcM8qlwbkI3olYgGDghb4
  5. #
  6. headers = {
  7. # "Authorization": "Bearer " + "WekCRfnAirSiSxALiD6gcm0B56EejsoK89zFbIaiZQD",
  8. # "Authorization": "Bearer " + "h7QtBUeJLTrYOY89sMqgNEKcM8qlwbkI3olYgGDghb4",
  9. "Authorization": "Bearer " + "t35vhZtWNgvDNWHc3DJh0OKll3mcB9GvC8K2EAkBug2",
  10. "Content-Type": "application/x-www-form-urlencoded"
  11. }
  12. i=1
  13. for i in range(1,100):
  14. params = {"message": "定期發送訊息"}
  15. r = requests.post("https://notify-api.line.me/api/notify",headers=headers, params=params)
  16. print(r)
  17. time.sleep(10)