Skip to content

Instantly share code, notes, and snippets.

@akashnimare
Created February 27, 2018 20:55
Show Gist options
  • Save akashnimare/f1f977da6cea048277695fb109224fa0 to your computer and use it in GitHub Desktop.
Save akashnimare/f1f977da6cea048277695fb109224fa0 to your computer and use it in GitHub Desktop.

Revisions

  1. akashnimare created this gist Feb 27, 2018.
    15 changes: 15 additions & 0 deletions index.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    const collegeList = [];
    var getAllCollege = document.getElementsByClassName('instituteName');

    for (let i = 0; i < getAllCollege.length; i++) {
    console.log("Total College count:", getAllCollege.length)
    collegeList.push
    (
    {
    "name": document.getElementsByClassName('instituteName')[i].innerText,
    "url": document.getElementsByClassName('instituteLinks')[i].innerHTML
    }
    )
    }
    copy(JSON.stringify(collegeList))