Extracting Google Scholar metadata 0 ▲ Revfad Blog 91 days ago · Tech · hide · Fediverse post I wanted to find the number of citations per year for a paper from my dad, at least per Google Scholar. Hacking around, here’s a little JavaScript to get it per results page: function extract(resultNode) { const titleElem = resultNode.querySelector(".gs_rt"); const titleLink = titleElem.querySelector("a"); let title = ""; let url = ""; let authors = ""; let year = ""; let publisher = ""; if (titleLink) { title = titleLink.textContent; url = titleLink.href; } else { title = titleElem.querySelector("span[id]").textContent; } const authorDateString = resultNode.querySelector(".gs_a").textContent; const authorDateMatch = /^(.+)\s-\s[^-]*\s*(\d{4})\s-\s([^-]+)/.exec(authorDateString); if (authorDateMatch) { authors = authorDateMatch[1]; year = authorDateMatch[2]; publisher = authorDateMatch[3]; } else { console.log("Didn't get author date match", authorDateString); const authorMatch = /^(.+)\s-\s([^-]+)/.exec(authorDateString); if (authorMatch) { authors = authorMatch[1]; publisher =… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town