#Want to know how to get a particular variable from a website in Jsoup

1 messages · Page 1 of 1 (latest)

glacial knot
#

here is my code so far
import java.io.IOException;
import java.util.*;
public class Main {
//rules for challenge: No using CPS more than 50
// only do humanly possible things

public static void main(String[] args) {
    final String url = "https://orteil.dashnet.org/experiments/cookie/";
    final Document document;
    try {
        document = Jsoup.connect(url).get();
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
    Elements money = document.select("money");
    System.out.println(document.outerHtml());
}

}

in short, im trying to get the amount of cookies i have fomr the classic cookie clicker game, my end goal is to make a bot for it

umbral ridgeBOT
#

<@&987246399047479336> please have a look, thanks.

tame glen
#

hmm

#

is it stored in the html?

glacial knot
#

i also need to grab the cost of the items

rose yoke
#

I think you first need to look into how the data you want to retrieve is stored.

glacial knot
#

how would i go about doing that?

rose yoke
#

But as stated in #rules we won't help you violate a games ToS.

umbral ridgeBOT
#

Closed the thread.

glacial knot
rose yoke
#

It does.