delete fn wait code login
This commit is contained in:
parent
29ccb24f65
commit
e3ba459b5f
|
|
@ -35,24 +35,6 @@ export class LangtonsApiBid extends ApiBid {
|
|||
return !(await this.page_context.$('input[name="loginEmail"]')) && fs.existsSync(filePath);
|
||||
}
|
||||
|
||||
async waitCodeLogin() {
|
||||
if (!this.page_context) return;
|
||||
|
||||
try {
|
||||
await this.page_context.waitForNavigation({ timeout: 15000, waitUntil: 'domcontentloaded' });
|
||||
} catch (error) {
|
||||
console.warn(`⚠️ [${this.id}] waitLogin timeout, reloading page...`);
|
||||
|
||||
await this.page_context.reload({ waitUntil: 'networkidle0' });
|
||||
|
||||
try {
|
||||
await this.page_context.waitForNavigation({ timeout: 15000, waitUntil: 'domcontentloaded' });
|
||||
} catch (err) {
|
||||
console.error(`❌ [${this.id}] Failed to navigate after reload:`, err.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async handleLogin() {
|
||||
const page = this.page_context;
|
||||
|
||||
|
|
@ -135,7 +117,6 @@ export class LangtonsApiBid extends ApiBid {
|
|||
|
||||
await page.goto(this.url, { waitUntil: 'networkidle2' });
|
||||
|
||||
// await this.waitCodeLogin();
|
||||
// 📂 Save session context to avoid re-login
|
||||
await this.saveContext();
|
||||
console.log(`✅ [${this.id}] Login successful!`);
|
||||
|
|
|
|||
Loading…
Reference in New Issue