1
0
generated from mirzaev/pot

2 Commits
1.0.3 ... 1.0.5

Author SHA1 Message Date
8ea9e7ef3d try catch for accounts 2025-03-06 06:28:41 +07:00
05143b6865 fixed messages 2025-03-06 06:21:52 +07:00
2 changed files with 91 additions and 87 deletions

View File

@@ -184,6 +184,8 @@ final class interneturok extends core
// Waiting for processing the request
sleep($waiting);
try {
if ($this->authentication($account)->wait()) {
// Authenticated the account
@@ -233,7 +235,7 @@ final class interneturok extends core
// Found the target subject
// Writing into the output buffer
echo "Найден школьный предмет: $subject->value для $grade класса (с " . new datetime($event->date)->format('d.m') . ' по ' . new datetime($event->date)->modify('+6 days')->format('d.m') . ")\n";
/* echo "Найден школьный предмет: $subject->value для $grade класса (с " . new datetime($event->date)->format('d.m') . ' по ' . new datetime($event->date)->modify('+6 days')->format('d.m') . ")\n"; */
// Initializing the unblock time
$unblock = svoboda::timestamp() - 31536000;
@@ -318,6 +320,9 @@ final class interneturok extends core
// Proceed to processing the next account
continue;
}
} catch (exception $exception) {
continue;
}
}
}
}

View File

@@ -209,7 +209,6 @@ final class parser extends core
$parser = new interneturok();
try {
// Parsing homework files
$files = $parser->parse(subject: $subject, grade: $grade, waiting: 3);
@@ -229,7 +228,7 @@ final class parser extends core
// Not initialized homework files
// Sending the message
$context->sendMessage('❌ *Не найдены домашние задания')
$context->sendMessage('❌ *Не найдены домашние задания*')
->then(function (message $message) use ($context) {
// Sended the message
@@ -239,7 +238,7 @@ final class parser extends core
}
} catch (exception $exception) {
// Sending the message
$context->sendMessage('⚠️ *Произошла ошибка при обработке домашних заданий')
$context->sendMessage('⚠️ *Произошла ошибка при обработке домашних заданий*')
->then(function (message $message) use ($context) {
// Sended the message