Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

Store all the sold items of Shopify!

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!

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]
Awesome share, from your posts I can see that you are really experienced when it comes to programming.

Good job!
(Nov 27, 2016 09:59 AM)Frukt Wrote:  Awesome share, from your posts I can see that you are really experienced when it comes to programming.

Good job!

Thanks dude 🎉🤗
1DarkDTkHTm5ouTPrZ6bUHpH345x4uiAfV
[Image: yreYV0T.jpg]
Looks like the website stopped updating for unknown reasons.

I must say that the script worked fine and got me lots of highly needed information.

DarkDelta is a BEAST!


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Python] by FreshiekingJun 8, 2019 06:33 AM 6 205 Jun 8, 2019 06:33 AM
Last Post: Random Arab Girl
[C#] by itcorpNov 4, 2018 02:46 PM 0 181 Nov 4, 2018 02:46 PM
Last Post: itcorp
[Python] by Dyst0piaSep 8, 2015 04:45 AM 6 156 Sep 8, 2015 04:45 AM
Last Post: Dyst0pia