Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- import os, sys
- import select
- import logging
- from logging.handlers import TimedRotatingFileHandler
- from selenium import webdriver
- from selenium.webdriver.common.by import By
- from selenium.webdriver.support.ui import Select
- from selenium.common.exceptions import NoSuchElementException
- import time, re, math
- from decimal import Decimal
- from datetime import datetime, timedelta
- import traceback
- import signal
- from selenium.webdriver.chrome.options import Options
- def create_browser():
- browser_options = Options()
- browser_options.add_argument("--headless")
- browser_options.add_argument('--no-sandbox')
- webdriver_loc = '/usr/bin/chromedriver
- browser = webdriver.Chrome(webdriver_loc, chrome_options=browser_options)
- return browser
- OurBrowser = create_browser()
- OurBrowser.driver.get("https://just-dice.com")
- time.sleep(10)
- OurBrowser.driver.find_element(By.CSS_SELECTOR, "a.fancybox-item.fancybox-close").click()
- time.sleep(5)
- OurBrowser.driver.find_element(By.LINK_TEXT, "Account").click()
- time.sleep(5)
- OurBrowser.driver.find_element(By.ID, "myuser").clear()
- time.sleep(1)
- OurBrowser.driver.find_element(By.ID, "myuser").send_keys("USERNAME")
- time.sleep(1)
- OurBrowser.driver.find_element(By.ID, "mypass").clear()
- time.sleep(1)
- OurBrowser.driver.find_element(By.ID, "mypass").send_keys("PASSWORD")
- time.sleep(1)
- OurBrowser.driver.find_element(By.ID, "myok").click()
- time.sleep(5)
- base = 0.0001
- tens = (base*10)
- sevens = (base*6.9)
- eights = (base*7.1)
- floatingbal = 0.0
- fumble = base
- def go():
- balance = get_balance()
- if ((balance>(((math.floor(balance/tens))*tens)+sevens)) and (balance<(((math.floor(balance/tens))*tens)+eights)) and (not (balance==floating))):
- fumble += fumble
- floating = float(balance)
- return fumble
- if ((fumble>=tens) and (balance<(((math.floor(balance/tens))*tens)+sevens))):
- fumble = base
- floating = 0.0
- return fumble
- if (((balance-(fumble*2))<=0) and (balance<(((math.floor(balance/tens))*tens)+sevens))):
- fumble = base
- floating = 0.0
- return fumble
- def bet():
- OurBrowser.driver.find_element(By.ID, "pct_chance").clear()
- time.sleep(0.01)
- OurBrowser.driver.find_element(By.ID, "pct_chance").send_keys(49.5000)
- time.sleep(0.01)
- OurBrowser.driver.find_element(By.ID, "pct_bet").clear()
- time.sleep(0.01)
- OurBrowser.driver.find_element(By.ID, "pct_bet").send_keys(go())
- time.sleep(0.01)
- OurBrowser.driver.find_element(By.ID, "a_lo").click()
- time.sleep(0.8)
- bet()
- def get_balance():
- balance_text = OurBrowser.driver.find_element(By.ID, "pct_balance").get_attribute("value")
- bal = float(balance_text)
- return bal
- bet()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement