Skip to content

Instantly share code, notes, and snippets.

@KustomApe
Created April 4, 2019 18:54
Show Gist options
  • Save KustomApe/8b8a2a08005d9dd3e2ac4d3e3607cd92 to your computer and use it in GitHub Desktop.
Save KustomApe/8b8a2a08005d9dd3e2ac4d3e3607cd92 to your computer and use it in GitHub Desktop.
from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome(executable_path='./chromedriver')
driver.get('https://jp.trade.highlow.net/')
login_box = driver.find_element_by_css_selector(
'#header > div > div > div > div > div > span > span > a:nth-child(5)')
login_box.click()
time.sleep(3)
ids = 'あなたのID'
pass_w = 'あなたのパスワード'
idss = driver.find_element_by_id('username-email')
idss.send_keys(ids)
pass2 = driver.find_element_by_id('password')
pass2.send_keys(pass_w)
login_activate = driver.find_element_by_css_selector('#login-trigger-button')
login_activate.click()
def high(num):
buy_btn = driver.find_element_by_css_selector('#invest_now_button')
high_btn = driver.find_element_by_css_selector('#up_button')
high_btn.click()
time.sleep(0.5)
buy_btn.click()
def low(num):
buy_btn = driver.find_element_by_css_selector('#invest_now_button')
high_btn = driver.find_element_by_css_selector('#down_button')
high_btn.click()
time.sleep(0.5)
buy_btn.click()
time.sleep(1)
ads = driver.find_element_by_class_name('cashback-tooltip')
driver.execute_script(
"""
var element = arguments[0];
element.parentNode.removeChild(element);
""", ads)
guess = int(input('Type in the number of 0 or 1 :'))
if guess == 0:
high(0)
else:
low(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment