Skip to content

fix: multi round trying#68

Merged
Perry2004 merged 1 commit intomainfrom
fix/two-time-trying
Nov 2, 2025
Merged

fix: multi round trying#68
Perry2004 merged 1 commit intomainfrom
fix/two-time-trying

Conversation

@Perry2004
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings November 2, 2025 00:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a retry mechanism for finding the "Load More" button before exiting the loop. When no "Load More" button is initially found, the code now waits 5 seconds and checks one more time before breaking out of the loop, potentially improving reliability when content loads slowly.

  • Introduced a triedFinding boolean flag to track retry attempts
  • Modified the logic to wait 5 seconds and retry once when no "Load More" button is found
  • Changed immediate break behavior to conditional break after retry attempt

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

break;
if (!triedFinding) {
await page.waitForTimeout(5000);
triedFinding = true;
Copy link

Copilot AI Nov 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The retry logic should continue the loop after waiting, not just set the flag. Currently, after the 5-second wait and setting triedFinding = true, the loop continues but immediately evaluates findLoadMoreButton again without any indication that the button should now be available. Consider adding continue; after line 149 to make the retry intent explicit.

Suggested change
triedFinding = true;
triedFinding = true;
continue;

Copilot uses AI. Check for mistakes.
@Perry2004 Perry2004 merged commit f594eb2 into main Nov 2, 2025
8 checks passed
@Perry2004 Perry2004 deleted the fix/two-time-trying branch November 2, 2025 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants