Skip to content

Commit

Permalink
Merge pull request #8 from cluebotng/loop-auth
Browse files Browse the repository at this point in the history
Authenticate in the work loop
  • Loading branch information
DamianZaremba authored Oct 26, 2021
2 parents 504b23c + 353d8ac commit 6752b4f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cluebot3.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@
$wpi = new \Wikipedia\Index($wph, $logger);
$wpapi = new \Wikipedia\Api($wph, $logger);

if (!$wpapi->login($user, $pass)) {
die('Failed to authenticate');
}
while (true) {
if (!$wpapi->login($user, $pass)) {
die('Failed to authenticate');
}

while (1) {
$titles = array();
$continue = null;
$ei = $wpapi->embeddedin('User:' . $user . '/ArchiveThis', 500, $continue);
Expand Down

0 comments on commit 6752b4f

Please sign in to comment.