Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import http.client
- import requests
- from bs4 import BeautifulSoup
- import time
- import json
- def send(message, webhook):
- conn = http.client.HTTPSConnection("discordapp.com")
- payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"content\"\r\n\r\n" + message + "\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
- headers = {
- 'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
- 'cache-control': "no-cache",
- }
- conn.request("POST", webhook, payload, headers)
- res = conn.getresponse()
- data = res.read()
- #print(data.decode("utf-8"))
- def get_attributes_json(itemid,proxies,mobileheaders):
- page=requests.get('http://www.supremenewyork.com/shop/'+itemid+'.json',headers=mobileheaders,proxies=proxies)
- objet=json.loads(page.text)
- attributes=dict()
- for item in objet['styles']:
- attributes[item['name']]=item['sizes']
- return attributes
- proxcopurl='https://discordapp.com/api/webhooks/389419558730989571/NpuVvOcRZi2FPBReJKBP3hxSPUjutIincaK86vEJqjz0TrKX_21r7yx9TcnJP92tC4BF'
- mobileheaders={"User-Agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.75 Mobile/14E5239e Safari/602.1"}
- headers = {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"}
- proxies = [{
- 'http': 'http://sapes.store:24002',
- 'https': 'http://sapes.store:24002',
- }]
- pid='171110'
- j=get_attributes_json(pid,proxies[0],mobileheaders)
- m='@everyone Box-Logo might have restocked. URL: http://www.supremenewyork.com/shop/sweatshirts/vwcq6doa1'
- while(True):
- try:
- if get_attributes_json(pid,proxies[0],mobileheaders)!=j:
- send(m,proxcopurl)
- except:
- pass
- time.sleep(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement