Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • Scraping items from online api? not working in dreambot?


    oh okay

    Recommended Posts

    DOoaTBZlQcyRUEugcfD0_Q.png

    Im trying to get an connection to a public updating price api but it seems like the connection doesn't go through and I don't see any errors in debugger? does anyone have an answer as to why?

     

     

    image.png

    Link to comment
    Share on other sites

    Not sure about your JSON library you're using, but this works for getting the data.
     

    		URL url = new URL("https://storage.googleapis.com/osbuddy-exchange/summary.json");
    		InputStream is = url.openConnection().getInputStream();
    		BufferedReader BR = new BufferedReader(new InputStreamReader(is));
    		String all = BR.lines().collect(Collectors.joining());

    Something tells me you have an issue with how you're parsing the JSON data.

    Link to comment
    Share on other sites

    51 minutes ago, NovaGTX said:

    Not sure about your JSON library you're using, but this works for getting the data.
     

    
    		URL url = new URL("https://storage.googleapis.com/osbuddy-exchange/summary.json");
    		InputStream is = url.openConnection().getInputStream();
    		BufferedReader BR = new BufferedReader(new InputStreamReader(is));
    		String all = BR.lines().collect(Collectors.joining());

    Something tells me you have an issue with how you're parsing the JSON data.

    Yeah I figured thats it, how do you go about parsing json yourself? I would love a snippet bro

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.