Compare commits
1 Commits
dbba005327
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| e201219ad0 |
@@ -19,6 +19,6 @@ RUN npx playwright install
|
|||||||
|
|
||||||
RUN bun add playwright-extra puppeteer-extra-plugin-stealth
|
RUN bun add playwright-extra puppeteer-extra-plugin-stealth
|
||||||
|
|
||||||
CMD ["bun","run","."]
|
#CMD ["bun", "index.ts"]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
13
index.ts
13
index.ts
@@ -804,7 +804,6 @@ async function navigateToGrading(page: Page, allClassGrades: any[]) {
|
|||||||
try {
|
try {
|
||||||
// Check if this row is a grade type header (Major Grades / Minor Grades)
|
// Check if this row is a grade type header (Major Grades / Minor Grades)
|
||||||
const gradeTypeSpan = await row.$('span.anchorText');
|
const gradeTypeSpan = await row.$('span.anchorText');
|
||||||
|
|
||||||
|
|
||||||
if (gradeTypeSpan) {
|
if (gradeTypeSpan) {
|
||||||
const gradeTypeText = (await gradeTypeSpan.textContent())?.trim();
|
const gradeTypeText = (await gradeTypeSpan.textContent())?.trim();
|
||||||
@@ -818,20 +817,14 @@ async function navigateToGrading(page: Page, allClassGrades: any[]) {
|
|||||||
logger.info(` → Set current grade type to MINOR`);
|
logger.info(` → Set current grade type to MINOR`);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (gradeTypeText === 'Semester Exam') {
|
|
||||||
currentGradeType = 'minor';
|
|
||||||
logger.info(` → Semester Exam Detected → defaulting to MINOR`);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Skip if we haven't found a grade type yet
|
||||||
if (!currentGradeType) {
|
if (!currentGradeType) {
|
||||||
logger.info(` Row ${j}: Skipping (no grade type set yet)`);
|
logger.info(` Row ${j}: Skipping (no grade type set yet)`);
|
||||||
currentGradeType = 'minor'; // default
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to extract grade data from this row
|
// Try to extract grade data from this row
|
||||||
// Look for any link in the row (could be linkDetails or other classes)
|
// Look for any link in the row (could be linkDetails or other classes)
|
||||||
const nameLink = await row.$('a');
|
const nameLink = await row.$('a');
|
||||||
|
|||||||
Reference in New Issue
Block a user