Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to use Jsoup in site that has lazyload scrollLoader.js

I have a problem about jsoup because of lazyload scrollLoader.js I reach site with java code, i have listed only 50 image name by jsoup.But when scroll down on site ,lots of image loads continously. My question is that, is it possible to post image amount into url that uses with Jsoup.connect() to get all image from the site?

here is site : http://www.logowik.com

And this is the usege of script in the site :

<script type="text/javascript">

            $(document).ready(function(e) {
                CalculateColumns();
                recordCount = 50;
                groupID = "0";
                catID = "0";
                query = "";
                userEntry = "";
                groupInterval = "0";
                AddEvent(window, "resize", CalculateColumns);
                document["scrollLoader"] = new scrollLoader({evn : getGrids, seize : 1});
                document["scrollLoader"].DoScroll();
                addLogoClickEvent();
            });


    </script>

I post this parameters with url like : http://www.logowik.com/index.php?g=1&groupID=1&catID=0 with this url I get 50 image,because of recordCount = 50 in script. but i cannot post this parameter to url. For getting 100 images, I try this url: http://www.logowik.com/index.php?recordCount=100&g=1&groupID=1&catID=0 but it doesn't effect.

Thanks

like image 456
reigeki Avatar asked Jul 01 '13 15:07

reigeki


1 Answers

Use firebug or chrome dev tools network panel to see all the requests generated when loading the images, then just recreate them in jsoup.

like image 95
Joseph Helfert Avatar answered Oct 05 '22 08:10

Joseph Helfert