S
S
Sergey Usoltsev2014-11-15 09:41:42
JavaScript
Sergey Usoltsev, 2014-11-15 09:41:42

Software that will automatically pull URLs with different IDs?

There is an archive site

Login: ivan1980 (same password)

Through the console I find the image I need, there is also a code that will automatically display the ID for me.
!function () {
    var id = '[id$=seadragonContainer] div div';
    var bt = '[id$=ForwardBtn]';
    var pages = {};
    var o = document.querySelector(id);

    !function _observe(undefined) {
        var ob = new MutationObserver(function() {
            var imgs = $(id+' img[src*=Pages]:first');
            if (imgs && imgs[0]) {
                var page = imgs[0].src.match(/id=([^&]+)/)[1];
                if (pages[page] == undefined) {
                    pages[page] = true;

                    ob.disconnect();

                    var next = $(bt);
                    if (next && next[0]) {
                        _observe();
                        next[0].click();
                    } else {
                        console.clear();
                        console.log("dxo.itemsValue=['" + Object.keys(pages).join("','")+"'];");
                    }
                }
            }
        });

        ob.observe(o, { childList: true, attributes: true, subtree: true });
    }();

    o.setAttribute('start', true);
}();

But, further, I need in the link (for example, in this one):
109.233.224.234:81/Pages/ImageFile.ashx?level=9&x=...

Change level=13 and titleOverlap=4048 and id=(substitute the result from the console).
The goal is to achieve automation. Is it possible to?
The idea is taken from here , but, unfortunately, does not work. Does not save images. What is the problem of not understanding.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question