Git Product home page Git Product logo

aternosapi's Introduction

AternosAPI

I wanted to add some features to this unofficial Aternos API, which uses BeatifulSoup and Requests to interact with the Aternos website under your account using some cookies.

How To Use

  • Get started using @Duerocraft's Youtube video. The functions used are not outdated, but you won't need all the cookies in the original example.
  • You will need to get your cookies to use this "API", which is really just a set of web scraping functions. See below.

Getting Cookies

  • Open the Aternos server homepage after logging in (aternos.org/server).
  • Open Inspect Element or your browser's equivalent. Then switch to the network tab.
  • Click on an event whose "Domain" is aternos.org. Look to the right for the Headers section.
  • Scroll down to the "Request Headers" section under Headers.
  • Copy the value next to "Cookie".
  • This is the value (as a str) you will need for the 'headers' parameter of AternosAPI().
  • Unaltered from the original example, the 'cookie' parameter of AternosAPI() should be "udpBAQS9ft13yXRMAQNc5rPFn9Tge5gQTLhqKimd5l2lfMH1am31UcSUY66AIDp9KOdacihXfzTEh0NuF1NuVEOf3npMyhwQNZPg".
  • I am not very familiar with cookies and web scraping, but this was in @Duerocraft's example, and it works for me.
  • Observe that your cookie value probably contains something along the lines of "ATERNOS_SEC_somerandomstuffhere=morerandom37x40200;".
  • With this example, the 'SEC' parameter of AternosAPI() will need to be "somerandomstuffhere:morerandom37x40200".

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.