Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require "selenium-webdriver"
- $sayings = [
- "Who is the one they call highlander?",
- "I must speak with the queen.",
- "My fortune is great in the kingdom of Camelot",
- "Today I am potato, tomorrow I am feminist.",
- "My foot just fell asleep someone call the police!",
- "This is incredible.",
- "I am as nine-thousand mermaids swimming in unison.",
- "No photographs, please.", "Geistgeld to the moooon!",
- "I am a bassplayer in band everyone here has heard of.",
- "Im about to hypothetical you in the clavical",
- "Draxx them sklounst!",
- "Wololooooo!",
- "Satoshi is a poser."]
- $potato = "i AM potato"
- class Troller
- def initialize
- #Login!
- @driver = Selenium::WebDriver.for :chrome
- @driver.navigate.to "https://poloniex.com"
- @driver.find_element(:xpath, "/html/body/div/div[2]/div[3]/ul/li[1]/span/a[1]").click
- username = @driver.find_element(:xpath, "//*[@id='username']")
- password = @driver.find_element(:xpath, "//*[@id='password']")
- username.send_keys("usr@usr.usr")
- password.send_keys("negros")
- @driver.find_element(:xpath, "//*[@id='content']/div/div/div/div[1]/form/button").click
- #Logged in
- @saybox = @driver.find_element(:xpath, "//*[@id='message']")
- end
- def getname
- end
- def spew
- if rand(10) < 8
- say = $sayings.sample
- puts say
- puts say
- @saybox.send_keys say, :return
- else
- puts "potato"
- @saybox.send_keys $potato, :return
- end
- end
- def record
- end
- end
- agent = Troller.new()
- loop do
- agent.spew
- sleep 10
- end
- #entries = driver.find_element(:xpath, "//*[@id='trollboxTable']/tbody")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement