Nov 27, 2016 08:17 AM
(This post was last modified: Nov 27, 2016 02:39 PM by DarkDelta.)
I made a little script for HackingDoge and he allowed me to share the source with you all.
So, without further ado, here's the script!
To set it up, run "pip install websocket-client" and then run the script.
It'll store all sold items in a text file in the same folder as the script and display them in the console as well.
Enjoy! 🎉
So, without further ado, here's the script!
PHP Code
<?php
import websocket
import json
def on_message(ws, message):
j_message = json.loads(message)
if j_message["event"] == "RandomShopProduct":
with open("products_bought.txt", "a") as fw:
fw.write("New product from " + j_message["hostname"] + "\r\n")
fw.write("Product name: " + j_message["shopify_product"]["title"] + "\r\n")
fw.write("Url: https://"+j_message["hostname"]+"/products/"+j_message["shopify_product"]["handle"] + "\r\n\r\n")
print("New product from " + j_message["hostname"])
print("Product name: " + j_message["shopify_product"]["title"])
print("Url: https://"+j_message["hostname"]+"/products/"+j_message["shopify_product"]["handle"])
print("-----------------------------------------------------------")
def on_error(ws, error):
print(error)
def on_close(ws):
print("### closed ###")
if __name__ == "__main__":
ws = websocket.WebSocketApp("wss://gopush.herokuapp.com/ws/private-all",
on_message = on_message,
on_error = on_error,
on_close = on_close)
ws.run_forever(sslopt={"cert_reqs": websocket.ssl.CERT_NONE})
To set it up, run "pip install websocket-client" and then run the script.
It'll store all sold items in a text file in the same folder as the script and display them in the console as well.
Enjoy! 🎉
1DarkDTkHTm5ouTPrZ6bUHpH345x4uiAfV
![[Image: yreYV0T.jpg]](https://i.imgur.com/yreYV0T.jpg)
![[Image: yreYV0T.jpg]](https://i.imgur.com/yreYV0T.jpg)



