Advertisement
Guest User

Review Downloader

a guest
Feb 14th, 2022
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let fail = 0;
  2. let inter = setInterval(function() {
  3. let arr = Array.from(document.getElementsByTagName(’div ’));
  4. let tmp = arr . find ( el => el . innerText . trim () === ’SHOW MORE’); if (tmp) {
  5. tmp. firstChild . click (); fail = 0;
  6. }else{
  7. window.scrollTo(0, document.body.scrollHeight);
  8. fail ++; }
  9. if (fail == 8) {
  10. clearInterval(inter);
  11. l e t elems = document . getElementsByTagName ( ’ span ’ ) ; for (let i = elems.length1; i>0; i−−) {
  12. let el = elems[i];
  13. if (el.innerText.trim() === ’’ || el.childNodes.length !== 1) {
  14. el . remove () }else{
  15. if (el.hasAttribute(’jsname’) && el.attributes.length <= 2 && el . innerText . length >= 16) { console.log(el.innerText);
  16. } }
  17. } }
  18. }, 1000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement