Giter Site home page Giter Site logo

pritam20ps05 / mcscraper Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 3.0 60 KB

MCScraper is a server side friendly discord bot made on python with selenium and undetected-chromedriver to ease the process of managing free aternos servers from discord guild text channels

License: GNU General Public License v3.0

Python 100.00%
aternos-server automation discord-bot

mcscraper's People

Contributors

pritam20ps05 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mcscraper's Issues

List-servers freezes

Got everything set up, venv for all the requirements, and run the bot. It logins to the discord properly and I can send commands, but once I use the list-servers command it does nothing. The servers.json doesn't populate and if I send another command to the bot, like another list-servers, I get this message
Screenshot 2022-04-14 225523

I have waited over 10 minutes, just to make sure that I was giving it enough time (even though I am 90% sure it should finish within seconds).

I debated just doing it manually, but I have a feeling that the issue is related to Chrome. I am even more fairly confident in this as I removed the --headless option and --disable-gpu option to try and see what the bot sees, yet nothing appeared.

An error in repl.it

python bot.py
Command raised an exception: WebDriverException: Message: unknown error: cannot connect to chrome at 127.0.0.1:48395
from session not created: This version of ChromeDriver only supports Chrome version 98
Current browser version is 91.0.4472.101

Invalid Token

I am using replit and I used process.env.token
JSON file:
{
"secret_key": "<process.env.['token']>",
"common_cookies": {
"one": {
"name": "process.env.['session']",
"value": ""
}
}
}`

Error:

`Traceback (most recent call last):
File "/home/runner/Aternos-API/venv/lib/python3.8/site-packages/discord/http.py", line 300, in static_login
data = await self.request(Route('GET', '/users/@me'))
File "/home/runner/Aternos-API/venv/lib/python3.8/site-packages/discord/http.py", line 254, in request
raise HTTPException(r, data)
discord.errors.HTTPException: 401 Unauthorized (error code: 0): 401: Unauthorized

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "mcscraper/bot.py", line 96, in
bot.run(credentials["secret_key"])
File "/home/runner/Aternos-API/venv/lib/python3.8/site-packages/discord/client.py", line 723, in run
return future.result()
File "/home/runner/Aternos-API/venv/lib/python3.8/site-packages/discord/client.py", line 702, in runner
await self.start(*args, **kwargs)
File "/home/runner/Aternos-API/venv/lib/python3.8/site-packages/discord/client.py", line 665, in start
await self.login(*args, bot=bot)
File "/home/runner/Aternos-API/venv/lib/python3.8/site-packages/discord/client.py", line 511, in login
await self.http.static_login(token.strip(), bot=bot)
File "/home/runner/Aternos-API/venv/lib/python3.8/site-packages/discord/http.py", line 304, in static_login
raise LoginFailure('Improper token has been passed.') from exc
discord.errors.LoginFailure: Improper token has been passed.`

Help!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.