Closed SandeshSarfare closed 7 years ago
Currently meet this issue too. I'm loading links from file and loop through it.
This is basic Javascript stuff, not so much an x-ray issue:
Try let
instead of var
in the loop.
See http://stackoverflow.com/questions/750486/javascript-closure-inside-loops-simple-practical-example https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Statements/let
I have below code which I have written to get all the links from pages however when the loop is running , I only get links on first page and that too multiple times so I think html is not getting changed i.e "links" from callback function. Not sure if that is because I am missing something in my code...but it should work with this code Or is it because cheerio is not loading it....Please suggest.