[WEB] get resource's download count

Discussion in 'Programming' started by SloPlays, Jun 5, 2017.

  1. Hello :)
    I would like to know if it's possible to get innnerHtml from the resource's spigot page.
    If possible (which should be) and if you know how, or if you think so know someone who could help me with this, please tell me.

    Maybe @filoghost you could, please, tell how you did with Donationholograms and BuyCraft / minecraftmarket.

    Thank anyone that may help, or try to help, in advance.

    Best regards.
    • Useful Useful x 2
  2. oh okay :3 let me take a look at that :p

    Thank you a lot for the fast reply.

    @andrewcbaker if you are online, could you please help me?
    I wa looking until now how to get that amoung and set a element to that (returned) number, but since i am pretty new to these things, i would need some help (if you could)

    Thank you in advance.

    Actualy I DID IT !!!:cool:
    If anyone ever needs this code and is going nuts copy it and it will work ;)

    <p id="download-count">NotAvealible</p>
        var gotdownloads = {};
            url: "https://api.spiget.org/v2/resources/2124",
            async: false,
            dataType: 'json',
            success: function(data) {
                gotdownloads = data.downloads;
        document.getElementById('download-count').innerHTML = gotdownloads;

    Hope it helps anyone, if not, it at least helped me :p

    Best regards, and thank you again @andrewcbaker :)

    If you're curious what i needed that for, here's the webpage address ;)
    It is not official yet, but i will be soon.

    Kind regards, and thank you for that fast response with simple & useful content :p
    It helped hell-a-lot.
    #3 SloPlays, Jun 5, 2017
    Last edited by a moderator: Jun 6, 2017