Created
August 11, 2024 02:18
-
-
Save ProjectEli/6d174a11036bbfc5a871fa90c521285f to your computer and use it in GitHub Desktop.
Google scholar extract as json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const tableBody = document.getElementById('gsc_a_b'); | |
const rows= tableBody.querySelectorAll('tr'); | |
const rowdata = []; | |
rows.forEach(row => { | |
const cells = row.querySelectorAll('td'); | |
const title = cells[0].querySelector('a').textContent; | |
const authors = cells[0].querySelector('.gs_gray').textContent.trim(); | |
const journal = cells[0].querySelectorAll('.gs_gray')[1].textContent.trim(); | |
const citations = cells[1].querySelector('a').textContent; | |
const year = cells[2].textContent; | |
rowdata.push({ title, authors, journal, citations, year }); | |
}); | |
console.log(rowdata) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment