cleaning up

average
Matt Huntington 2 years ago
parent 67c79fd7f0
commit f78a90ce34

@ -7,7 +7,6 @@ const delay = (ms) => {
}
const scrapeInstance = async (link, page) => {
console.log('scraping instance');
await link.click();
await page.waitForNavigation();
@ -34,6 +33,7 @@ const scrapeInstance = async (link, page) => {
console.log({ instanceID, graduationDate, totalStudents, dropped, outcomes90Numeric, outcomes90Percent });
return page.goBack();
}
(async () => {
@ -69,12 +69,9 @@ const scrapeInstance = async (link, page) => {
const instanceLinks = await page.$$('tr td:nth-child(2) a');
await scrapeInstance(instanceLinks[0], page);
//for(elem of elems){
//const prop = await elem.getProperty('innerHTML');
//const value = await prop.jsonValue();
//console.log(value);
//}
for(instance of instanceLinks){
await scrapeInstance(instance, page);
}
console.log('done');
//await page.screenshot({ path: 'outcomes.png' })

Loading…
Cancel
Save