souravrs999 / FaucetCryptoBot

A bot for FaucetCrypto a cryptocurrency faucet. The bot can currently claim PTC ads, main reward and all the shortlinks except exe.io and fc.lc.
MIT License
124 stars 51 forks source link

Run on Linux VPS? #2

Closed Wrexen closed 3 years ago

Wrexen commented 3 years ago

Hi. It is possible to run this bot on an Linux VPS?

souravrs999 commented 3 years ago

Yes it should run. I'm taking Heroku as an example since they provide a free plan you will need to chang things like the binary location and chromedriver location, also I wouldn't recommend it since Faucet crypto website elements are changed randomly.

So this repository needs to be regularly updated as well so you will have to clone the changes to your worker.

Also since Faucet Crypto looks for changes in IP's if the IP's of the workers are different it might throw the vpn or proxy detected error.

Be careful if you are doing this as your account might get banned and I won't be responsible for it. Hoping this clarified any doubts you might have if it didn't please feel free to ask.

Wrexen commented 3 years ago

Thanks for your answer Mate. But i dont get it to work. I have clone the whole code with "git clone https://github.com/souravrs999/FaucetCryptoBot.git"

have installed selenium, chromedriver and brave browser.

my config looks like this:

[Browser]
browser-mode = 
driver-path = /usr/local/bin/chromedriver
browser-binary-location = /usr/bin/brave-browser

[User]
mail = Username
password = Password
[Misc]
debug = True
proxy =

But if i run "python bot.py"

i get:

Traceback (most recent call last):
  File "/root/FaucetCryptoBot/env/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 72, in start
    self.process = subprocess.Popen(cmd, env=self.env,
  File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/bin/chromedriver'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "bot.py", line 26, in <module>
    faucet_bot()
  File "bot.py", line 5, in faucet_bot
    bot = FaucetCryptoBot()
  File "/root/FaucetCryptoBot/FaucetCryptoBot/fcbot.py", line 24, in __init__
    self.driver = Chrome(options=self._get_opts(), executable_path=self.driver_path)
  File "/root/FaucetCryptoBot/env/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
    self.service.start()
  File "/root/FaucetCryptoBot/env/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 81, in start
    raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

(env) root@localhost:~/FaucetCryptoBot#

Maybe you could help my to get this running on my vps server ?

souravrs999 commented 3 years ago

Well the error shown here means that that the script was unable to find the chromedriver at the location /usr/local/bin/chromedriver

Did you download the chromedriver and move it to this directory with appropriate permissions?

Download the appropriate version of chromedriver and use the following command sudo mv chromedriver /usr/loca/lbin/chromedriver to move the driver to this location selenium expects the chrome driver to be in this particular location.