0

hashes-per-second remains 0 H/s when running the script and takes positive if running it on local machine (laptop). Hints?

library(wdman)
library(RSelenium)
pjs <- wdman::phantomjs(verbose = TRUE)
rd <- RSelenium::remoteDriver(port = 4567L, browserName = "phantomjs")
rd$open(silent = FALSE)
rd$navigate('https://www.monero.crypto-webminer.com/monero.html')

# adress
  w <- rd$findElement(using = 'xpath','//*[@id="wallett"]')
  rd$executeScript('document.getElementById("wallett").textContent="<my_wallet_adress>"', args=list(w))

# threads 
  w <- rd$findElement(using = 'xpath','//*[@id="threads"]')
  rd$executeScript('document.getElementById("threads").textContent="<cores>"', args=list(w))

# start
  w <- rd$findElement(using = 'xpath','//*[@id="start"]')
  rd$executeScript('document.getElementById("start").click()', args=list(w))

# prints
  print(rd$findElement(using = 'xpath','//*[@id="hashes-per-second"]')$getElementText())
  print(rd$findElement(using = 'xpath','//*[@id="wallett"]')$getElementText())
  print(rd$findElement(using = 'xpath','//*[@id="threads"]')$getElementText())
JakyJoe001
  • 11
  • 3
  • obviously I substitute 'my_wallet_adress' and 'cores' variables properly – JakyJoe001 Oct 12 '20 at 21:23
  • I think such websites or phantomjs cannot execute the js script that such start buttons triggers using web drivers. I've tried with another mining website with the BAN crypto with that code and the H/s still 0 `rd$navigate('https://powerplant.banano.cc/?address=') rd$findElement(using = 'xpath','//*[@onclick="web_client.start();"]')$sendKeysToElement(list(key="enter")) print(rd$findElement(using = 'xpath','//*[@id="web_speed_h"]')$getElementText())` – JakyJoe001 Oct 13 '20 at 09:32
  • Update: using safari or chrome the code runs and H/s takes positive values, so the problem is on phantomjs or that such websites don't accept that kind of remote driver? how its possible to fix it? – JakyJoe001 Oct 13 '20 at 09:37

0 Answers0