Skip to content

Instantly share code, notes, and snippets.

@phette23
Created October 20, 2023 15:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phette23/306ae08eec5422a497ab939baf8606d0 to your computer and use it in GitHub Desktop.
Save phette23/306ae08eec5422a497ab939baf8606d0 to your computer and use it in GitHub Desktop.
check if sections syllabi are on VAULT search results page
// check if these sections appear on EQUELLA search results page
const sections = [
'GELCT-6700-2',
'LITPA-2000-10',
'WRITE-6000-2',
]
console.log(`Checking for ${sections.length} section codes`)
// return list of missing sections
const missing = sections.filter(s => {
return !$('.itemresult-metaline .htmlcontent').map((i,e) => {
return $(e).text().trim()
}).get().includes(s)
})
console.log(`There are ${missing.length} missing`)
if (missing.length) missing.forEach(s => console.log(s))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment