SHARE
TWEET

Untitled

a guest Jun 19th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let data = [...document.querySelectorAll('div.card-block')]
  2.       .map((el, index) => {
  3.         let typ, ort, projekt
  4.         typ = el.querySelector('div.card-block h3.card-subtitle')
  5.         ort = el.querySelector('div.card-block>h3.card-subtitle')
  6.         projekt = el.querySelector('a h2.card-title')
  7.        
  8.         let hit = {
  9.           typ: typ ? typ.innerText : '<not set>,
  10.           ort: ort ? ort.innerText : '<not set>',
  11.           projekt: projekt ? projekt.innerText : '<not set>'
  12.         }
  13.         return hit
  14.       })
  15. data.forEach((el) => {console.log(Object.keys(el).map(function(n) { return el[n]; }).join(','))})
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top