Advertisement
Cool_boy21

DataScrapper minimized

Jan 16th, 2019
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*DataScrapper by prettydude v1.0*/
  2. function find(a,b){let c={};a=a.split("\n"),a.forEach(function(d){let g,e=d.split(":")[0],f=d.slice(e.length+1).trim(),h=[];if(f.startsWith("<")){let i=document.createElement("div");i.innerHTML=f.trim();let j=i.firstChild,k=j.className?"."+j.className.replace(" ","."):"";f=j.id?"#"+j.id:j.tagName.toLowerCase()+k}g=document.querySelectorAll(f);for(let i of g)if(h.push(i.textContent),!b)break;c[e.trim()]=h}),document.body.innerHTML=JSON.stringify(c)}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement