Advertisement
coinwalk

snowybot python

Jan 2nd, 2024
788
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.70 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3.  
  4. import os, sys
  5. import select
  6. import logging
  7. from logging.handlers import TimedRotatingFileHandler
  8. from selenium import webdriver
  9. from selenium.webdriver.common.by import By
  10. from selenium.webdriver.support.ui import Select
  11. from selenium.common.exceptions import NoSuchElementException
  12. import time, re, math
  13. from decimal import Decimal
  14. from datetime import datetime, timedelta
  15. import traceback
  16. import signal
  17. from selenium.webdriver.chrome.options import Options
  18.  
  19.     def create_browser():
  20.         browser_options = Options()
  21.         browser_options.add_argument("--headless")
  22.         browser_options.add_argument('--no-sandbox')
  23.         webdriver_loc = '/usr/bin/chromedriver
  24.         browser = webdriver.Chrome(webdriver_loc, chrome_options=browser_options)
  25.         return browser
  26.  
  27. OurBrowser = create_browser()
  28. OurBrowser.driver.get("https://just-dice.com")
  29. time.sleep(10)
  30. OurBrowser.driver.find_element(By.CSS_SELECTOR, "a.fancybox-item.fancybox-close").click()
  31. time.sleep(5)
  32. OurBrowser.driver.find_element(By.LINK_TEXT, "Account").click()
  33. time.sleep(5)
  34. OurBrowser.driver.find_element(By.ID, "myuser").clear()
  35. time.sleep(1)
  36. OurBrowser.driver.find_element(By.ID, "myuser").send_keys("USERNAME")
  37. time.sleep(1)
  38. OurBrowser.driver.find_element(By.ID, "mypass").clear()
  39. time.sleep(1)
  40. OurBrowser.driver.find_element(By.ID, "mypass").send_keys("PASSWORD")
  41. time.sleep(1)
  42. OurBrowser.driver.find_element(By.ID, "myok").click()
  43. time.sleep(5)
  44. base = 0.0001
  45. tens = (base*10)
  46. sevens = (base*6.9)
  47. eights = (base*7.1)
  48. floatingbal = 0.0  
  49. fumble = base
  50.     def go():
  51.         balance = get_balance()
  52.         if ((balance>(((math.floor(balance/tens))*tens)+sevens)) and (balance<(((math.floor(balance/tens))*tens)+eights)) and (not (balance==floating))):
  53.             fumble += fumble
  54.             floating = float(balance)
  55.             return fumble
  56.         if ((fumble>=tens) and (balance<(((math.floor(balance/tens))*tens)+sevens))):
  57.             fumble = base
  58.             floating = 0.0
  59.             return fumble
  60.         if (((balance-(fumble*2))<=0) and (balance<(((math.floor(balance/tens))*tens)+sevens))):
  61.             fumble = base
  62.             floating = 0.0
  63.             return fumble
  64.  
  65.     def bet():
  66.         OurBrowser.driver.find_element(By.ID, "pct_chance").clear()
  67.         time.sleep(0.01)
  68.         OurBrowser.driver.find_element(By.ID, "pct_chance").send_keys(49.5000)
  69.         time.sleep(0.01)
  70.         OurBrowser.driver.find_element(By.ID, "pct_bet").clear()
  71.         time.sleep(0.01)
  72.         OurBrowser.driver.find_element(By.ID, "pct_bet").send_keys(go())
  73.         time.sleep(0.01)
  74.         OurBrowser.driver.find_element(By.ID, "a_lo").click()
  75.         time.sleep(0.8)
  76.         bet()
  77.  
  78.     def get_balance():
  79.         balance_text = OurBrowser.driver.find_element(By.ID, "pct_balance").get_attribute("value")
  80.         bal = float(balance_text)
  81.         return bal
  82.  
  83.  
  84. bet()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement