NameMC Scrape API

This is an api to scrape NameMC using message previews generated by discord.

NameMC makes it a pain to scrape their website, but somehow, discord has found a magical way to scrape it for us. How discord does it? No clue. But, I’ve made a simple, super fast api, to use discord to scrape it for us.

I’ve decided to open source this project, mostly because currently, there’s lots of similar projects, which either cost lots of money, or are public apis which have frequent downtime. I’m not hosting this api publically, but you can! Feel free to fork, or share ideas.

Enjoy! To see how it works, you can follow the below guide:

To set up:

  1. Create a config.json file
  2. Go to discord’s dev portal, and create a new application. Then go to the bot page, click “create bot,” copy the token, and go back to your config.json file.
  3. In the config.json file, add {"token":"token_you_just_copied"}.
  4. Go to the o2auth page, click the checkmark next to “bot,” scroll down, click the checkmark next to “administrator,” and copy the bot invite link that should now be generated.
  5. Go back to discord’s normal website. Go to discord settings, advanced, and then enable developer mode.
  6. Create a new fresh discord server, and then delete the chats that it comes with when you make it.
  7. Paste the invite link into a new tab, and invite the discord bot to the server you made.
  8. Right click on the server’s icon, and click “copy id.”
  9. In the config.json file, change the format to {"token":"token_you_copied_earlier","server":server_id}.
  10. In file explorer, click the directory address, and type “cmd” into the address. A new console window should open.
  11. Double click "dependencies.sh" to install needed dependencies for the api to run.
  12. Assuming python is installed, type “python api.py” to run the script. If python isn’t installed, google how to install it.
  13. Open a new tab in your browser, and go to “.” The api is now working.

If you have any questions, I can be reached at @Twilak#7765. Enjoy!

GitHub

View Github