jquery - How to handle "TypeError: HTMLScriptElement" when scroll down with Phantomjs to load dynamic content -


i'm trying scroll down google play webpage (https://play.google.com/store/apps/category/health_and_fitness/collection/topselling_free) phantomjs.

i've tried method described in answer(how scroll down phantomjs load dynamic content), gives error message "typeerror: htmlscriptelement not function (evaluating 'el(kl(window.location.href))')" , doesn't works...

here's code..

page.open(url, function() { page.includejs("http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js", function() {     var cnt = 1;     var history = 0;     window.setinterval(function() {         console.log(cnt);         var rettext = page.evaluate(function() {                             window.document.body.scrolltop = document.body.scrollheight;             return $("a.title").text();         });          var height = page.evaluate(function() {             return document.body.scrolltop;         });          cnt = cnt + 1;          if(cnt > 10 || history == height){             console.log(rettext);             console.log(system.args[2])             phantom.exit();         }          history = height;       //interval     }, 5000); }); }); 

i think code works on of dynamic web pages there's disturb scrolling down in google webpages.

is there way resolve problem?


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -