subscribe.py 170 B

12345678
  1. #!/usr/bin/env python3
  2. import requests
  3. resp = requests.get("https://ntfy.sh/mytopic/json", stream=True)
  4. for line in resp.iter_lines():
  5. if line:
  6. print(line)