()
| 459 | |
| 460 | // Cookie helper methods |
| 461 | getCookiesPath() { |
| 462 | if (!this.config.cookiesEnabled || !this.config.customCookiesUploaded) { |
| 463 | return null; |
| 464 | } |
| 465 | |
| 466 | const configDir = path.dirname(this.configPath); |
| 467 | const cookiePath = path.join(configDir, 'cookies.user.txt'); |
| 468 | |
| 469 | // Check if the file exists |
| 470 | if (fs.existsSync(cookiePath)) { |
| 471 | return cookiePath; |
| 472 | } |
| 473 | |
| 474 | // Log warning if cookies are enabled but file is missing |
| 475 | logger.warn({ cookiePath }, 'Cookie file not found, falling back to no cookies'); |
| 476 | return null; |
| 477 | } |
| 478 | |
| 479 | getCookiesStatus() { |
| 480 | const configDir = path.dirname(this.configPath); |
no outgoing calls
no test coverage detected