Created
March 3, 2019 15:50
-
-
Save 1049451037/cf7a046bbec6e9e019ee8a8cc28c9383 to your computer and use it in GitHub Desktop.
QPush: Push Messages to Mobile Phone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
class QPush: | |
def __init__(self, name, code): | |
self.name = name | |
self.code = code | |
def send(self, msg): | |
data = { | |
"name": self.name, | |
"code": self.code, | |
"sig": "", | |
"cache": "false", | |
"msg[text]": str(msg) | |
} | |
url = "https://qpush.me/pusher/push_site/" | |
return requests.post(url, data=data) | |
if __name__ == '__main__': | |
qpush = QPush(your_qpush_name, your_qpush_code) | |
qpush.send("test") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage of this script: Send log info to your mobile when you need to run a code for a long time.