Could bring this porridge to pastebin and to a normal form, but it is impossible to look there. If you are too lazy to do it, then the potential respondents, even more so. Is it really so difficult to use any online automatic formatting tool (html beatifier)?
Work the code will be fine, what you do not like?
var elements = document.querySelectorAll(".divFarmPoke") for(var i = 0; i < elements.length; i++){ var pokeinfo = ""; pokeinfo += " image src: " + elements[i].querySelector(".image").src; pokeinfo += " name: " + elements[i].querySelector(".name").innerText; pokeinfo += " lvl: " + elements[i].querySelector(".lvl").innerText; pokeinfo += " ivcode: " + elements[i].querySelector(".ivcode").innerText; console.log(pokeinfo) }
<div id="divFarmList" class=""> <div class="divFarmPoke"> <div class="button ctrl nobg btnBack"> </div> <div class="pokemonBoxTiny sizeundefined clickable"> <img class="image" src="//img.league17.ru/pub/pkmn/norm/anim/298.gif"> <div class="name"> #298 Азурилл </div> <div class="shorts"> <span class="sex1 breedable">♂</span><span class="lvl">6</span> </div> <div class="extra"> <span><span class="ivcode">h0a24d9s21sa12sd26.100G</span></span> </div> </div> </div> <div class="hr"> </div> <div class="divFarmPoke"> <div class="button ctrl nobg btnBack"> </div> <div class="pokemonBoxTiny sizeundefined clickable"> <img class="image" src="//img.league17.ru/pub/pkmn/norm/anim/298.gif"> <div class="name"> #298 Азурилл </div> <div class="shorts"> <span class="sex2 breedable">♀</span><span class="lvl">6</span> </div> <div class="extra"> <span><span class="ivcode">h8a13d12s23sa7sd6.100A</span></span> </div> </div> </div> <div class="hr"> </div> <div class="divFarmPoke"> <div class="button ctrl nobg btnBack"> </div> <div class="pokemonBoxTiny sizeundefined clickable"> <img class="image" src="//img.league17.ru/pub/pkmn/norm/anim/118.gif"> <div class="name"> #118 Голдин </div> <div class="shorts"> <span class="sex1 breedable">♂</span><span class="lvl">12</span> </div> <div class="extra"> <span><span class="ivcode">h8a6d26s3sa4sd11.100G</span></span> </div> </div> </div> <div class="hr"> </div> </div>
About the fact that the code does not display all, what do you want? It displays only what is on the page. It is necessary for all, load the remaining pages and parse them. Either through Ajax, or through manual transitions.
In any case, do not forget about the rules, and in the case of using third-party bot programs, you may be in for a ban, and as an option for the whole IP subnet: Ligue 17: rules