zdu-student-api 1.1.12 → 1.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -137,7 +137,7 @@ function parseSchedule(html) {
|
|
|
137
137
|
index = allInds[indIdx];
|
|
138
138
|
}
|
|
139
139
|
indIdx++;
|
|
140
|
-
const dateMatch = thContent.match(
|
|
140
|
+
const dateMatch = thContent.match(/(\d{2}\.\d{2}\.\d{4})/);
|
|
141
141
|
const date = dateMatch ? dateMatch[1] : '';
|
|
142
142
|
const timeMatch = thContent.match(/<br[^>]*>\s*(\d{2}:\d{2}-\d{2}:\d{2})/);
|
|
143
143
|
const time = timeMatch ? timeMatch[1].trim() : '';
|
|
@@ -163,7 +163,7 @@ function parseSchedule(html) {
|
|
|
163
163
|
*/
|
|
164
164
|
function parseDescriptions(html) {
|
|
165
165
|
const descriptions = new Map();
|
|
166
|
-
const divRegex = /<div\s+id="r
|
|
166
|
+
const divRegex = /<div\s+id="(r\d+)"\s+class="hidden">\s*([\s\S]*?)\s*<br>/g;
|
|
167
167
|
let match;
|
|
168
168
|
while ((match = divRegex.exec(html)) !== null) {
|
|
169
169
|
const index = match[1];
|
package/dist/examples.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import 'dotenv/config';
|
|
2
|
+
// import process from 'process';
|
|
3
|
+
// import { writeFile } from 'fs/promises';
|
|
2
4
|
// const schedule = new Schedule();
|
|
3
5
|
// schedule.group = '23Бд-СОінф123'
|
|
4
6
|
// schedule.type = 'group'
|
|
@@ -65,7 +67,7 @@ import 'dotenv/config';
|
|
|
65
67
|
// // // console.log(cb.sesID, cb.sessGUID);
|
|
66
68
|
// await cb.loadData();
|
|
67
69
|
// const scores = cb.allScores;
|
|
68
|
-
// await writeFile('scores.json', JSON.stringify(scores, null, 2)
|
|
70
|
+
// await writeFile('scores.json', JSON.stringify(scores![14], null, 2));
|
|
69
71
|
// console.log(cb.data);
|
|
70
72
|
// await cb.getDisciplines();
|
|
71
73
|
// console.log(await cb.getId());
|