1
0

fix: Parser
All checks were successful
Remote Deploy / deploy (push) Successful in 4s

This commit is contained in:
2025-08-31 10:07:05 +02:00
parent e41d94ef34
commit 4ca86812a7
2 changed files with 10 additions and 5 deletions

View File

@@ -35,7 +35,7 @@ function parseThisShit(downloadedFilePath) {
const currentSheet = workbook.Sheets[key];
final.push({});
const regex = /[AEC][0-4][a-c]?\/.*/s;
const regex = /[AEC][0-4][a-c]?\s*\/.*/s;
const prefixRegex = /[AEC][0-4][a-c]?/;
const classes = [];
const matchingKeys = Object.keys(currentSheet).filter(key => {

View File

@@ -6,7 +6,7 @@ const parseThisShit = require('./parse');
const EMAIL = process.env.EMAIL;
const PASSWORD = process.env.PASSWORD;
//const SHAREPOINT_URL = 'https://onedrive.live.com/personal/7d8c4d9baeeebde3/_layouts/15/doc2.aspx?resid=2bddf9b7-8613-4ae3-a684-0be6d73d90bf&cid=7d8c4d9baeeebde3&ct=1748937302474&wdOrigin=OFFICECOM-WEB.START.UPLOAD&wdPreviousSessionSrc=HarmonyWeb&wdPreviousSession=ce7df0ab-aade-4df2-9e2e-492e99049666';
const SHAREPOINT_URL = 'https://spsejecnacz.sharepoint.com/:x:/s/nastenka/EbA_RcWKRdRNlB8YU1iuWM4BnMetCQlVm8toHuuyW-TPyA?e=uu3iPR&CID=2686cea0-2d06-3304-4519-087fb9e06fd0';
const SHAREPOINT_URL = 'https://spsejecnacz.sharepoint.com/:x:/s/nastenka/ESy19K245Y9BouR5ksciMvgBu3Pn_9EaT0fpP8R6MrkEmg';
const VOLUME_PATH = path.resolve('./volume/browser');
async function clearDownloadsFolder() {
@@ -42,9 +42,14 @@ async function clearDownloadsFolder() {
if (page.url().includes('login.')) {
console.log('Logging in...');
await page.waitForSelector('input[type="email"]', { timeout: 10000 });
await page.type('input[type="email"]', EMAIL, { delay: 50 });
await page.keyboard.press('Enter');
try {
await page.waitForSelector('input[type="email"]', { timeout: 3000 });
await page.type('input[type="email"]', EMAIL, { delay: 50 });
await page.keyboard.press('Enter');
} catch {
await page.waitForSelector(".table");
await page.click('.table');
}
await new Promise(r => setTimeout(r, 2000));
try {