Advertisement
coinwalk

snowybot python

Jan 2nd, 2024
838
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.71 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.  
  51.    def go():
  52.         balance = get_balance()
  53.         if ((balance>(((math.floor(balance/tens))*tens)+sevens)) and (balance<(((math.floor(balance/tens))*tens)+eights)) and (not (balance==floating))):
  54.             fumble += fumble
  55.             floating = float(balance)
  56.             return fumble
  57.         if ((fumble>=tens) and (balance<(((math.floor(balance/tens))*tens)+sevens))):
  58.             fumble = base
  59.             floating = 0.0
  60.             return fumble
  61.         if (((balance-(fumble*2))<=0) and (balance<(((math.floor(balance/tens))*tens)+sevens))):
  62.             fumble = base
  63.             floating = 0.0
  64.             return fumble
  65.  
  66.     def bet():
  67.         OurBrowser.driver.find_element(By.ID, "pct_chance").clear()
  68.         time.sleep(0.01)
  69.         OurBrowser.driver.find_element(By.ID, "pct_chance").send_keys(49.5000)
  70.         time.sleep(0.01)
  71.         OurBrowser.driver.find_element(By.ID, "pct_bet").clear()
  72.         time.sleep(0.01)
  73.         OurBrowser.driver.find_element(By.ID, "pct_bet").send_keys(go())
  74.         time.sleep(0.01)
  75.         OurBrowser.driver.find_element(By.ID, "a_lo").click()
  76.         time.sleep(0.8)
  77.         bet()
  78.  
  79.     def get_balance():
  80.         balance_text = OurBrowser.driver.find_element(By.ID, "pct_balance").get_attribute("value")
  81.         bal = float(balance_text)
  82.         return bal
  83.  
  84.  
  85. bet()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement