SHARE
TWEET

Untitled

a guest Jan 24th, 2020 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import time
  2. import random
  3. import requests
  4. import threading
  5. import favicon
  6. from datetime import datetime
  7. from bs4 import BeautifulSoup
  8. from dhooks import *
  9.  
  10. proxies = {
  11.   'http': 'http://GJU5810UBP:2UQ5Y5N6@snkrs-uk-s63.blankbot.co.uk:33128',
  12.   'https': 'https://GJU5810UBP:2UQ5Y5N6@snkrs-uk-s63.blankbot.co.uk:33128',
  13. }
  14.  
  15. urls = ['https://eflash-us.doverstreetmarket.com','https://jackboys.travisscott.com','https://bdgastore.com','https://shop-usa.palaceskateboards.com','https://dropsau.com/','https://eflash-jp.doverstreetmarket.com/','https://wearebraindead.com','https://eflash-sg.doverstreetmarket.com','https://shop-jp.palaceskateboards.com/']
  16.  
  17. webhook_url = 'https://discordapp.com/api/webhooks/669978360352473099/LXf6rsdSd2-ZWpZfd6vtQ6EzOApZmJlpg-8tVph48ggYV7jyiVUW5UzRbGQJSemzgNRJ'
  18.  
  19. error_url = 'https://discordapp.com/api/webhooks/669556319136645161/j-kWiM8lbXVl6xIdQx7q24U1BThaxeCzX9gNbsSHNCtyYeWHyN1VeE8x5BOhZIWoJzfR'
  20.  
  21. delay = '5'
  22.  
  23. icons = []
  24.  
  25. a = 0
  26.  
  27. counttemp = -1
  28.  
  29. headers = {
  30.  
  31.     'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36'
  32. }
  33.  
  34. #def favpage(site):
  35. #    iconlist = favicon.get(site)
  36. #    icon = iconlist[0]
  37. #    return icon.url
  38.  
  39. print("Starting ...")
  40.  
  41. #for t in urls:
  42. #    iconurl = favpage(t)
  43. #    icons.append(iconurl)
  44. #    a += 1
  45. #    print("Initialisation ----------[" + str(a) + "/" + str(len(urls)+1) + "]")
  46. #    pass
  47.  
  48. print("Done !")
  49. #print(icons)
  50.  
  51. def message_post(pw_status,monitor_store_url):
  52.     hook = Webhook(webhook_url)
  53.     embed = Embed(description=str(monitor_store_url),color=16635449,timestamp='now')
  54.     embed.set_title(title=str(pw_status),url=monitor_store_url)
  55.     embed.set_footer(text='Powered by Sneaker Bot',icon_url='https://sneakerbot.fr/wp-content/uploads/2020/01/IMG_1118.jpg')
  56.     hook.send(embed=embed)
  57.     print('[SUCCESS] --> Successfully sent success webhook!')
  58.  
  59. def error_post(message,monitor_store_url):
  60.     hook = Webhook(error_url)
  61.     embed = Embed(description='**'+str(message)+'**',color=15149353,timestamp='now')
  62.     embed.set_title(title=str(monitor_store_url),url=monitor_store_url)
  63.     embed.set_footer(text='Powered by Sneaker Bot',icon_url='https://sneakerbot.fr/wp-content/uploads/2020/01/IMG_1118.jpg')
  64.     hook.send(embed=embed)
  65.     print('[SUCCESS] --> Successfully sent success webhook!')
  66.  
  67. def main(url):
  68.     last_status = ''
  69.  
  70.     while True:
  71.         try:
  72.             page_source = requests.get(url,headers=headers,proxies=proxies)
  73.  
  74.             page_text = BeautifulSoup(page_source.text,"lxml")
  75.  
  76.  
  77.             if 'Opening Soon' in page_text.title.text:
  78.  
  79.                 pw_status = "Password Page Up :lock:"
  80.  
  81.                 if pw_status != last_status:
  82.  
  83.                     #counttemp += 1
  84.  
  85.                     message_post(pw_status,url)
  86.  
  87.                     last_status = pw_status
  88.  
  89.             else:
  90.  
  91.                pw_status = "Password Page Down :unlock:"
  92.  
  93.                if pw_status != last_status:
  94.  
  95.                     message_post(pw_status,url)
  96.  
  97.                     last_status = pw_status
  98.  
  99.             now = datetime.now()
  100.  
  101.             print(str(now) + ' Monitoring-------------------[ '+str(url)+'   '+last_status+' ]')
  102.  
  103.             time.sleep(int(delay))
  104.         except:
  105.             print('Error Requesting to This site   ',url)
  106.             time.sleep(5)
  107.  
  108. if __name__ == "__main__":
  109.     for i in urls:
  110.         threading.Thread(name=str(i),target=main,args=(i,)).start()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top