Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion linkedin_scraper/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async def detect_rate_limit(page: Page) -> None:

# Check for rate limit messages
try:
body_text = await page.locator('body').text_content(timeout=1000)
body_text = await page.locator('body').inner_text(timeout=1000)
Comment on lines 89 to +91
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

There’s currently no automated test coverage for detect_rate_limit() (no tests reference it), and this change tweaks detection semantics in a way that’s easy to regress. Consider adding a small unit test using page.set_content() with hidden DOM text containing "try again later" to ensure it does not raise, and another with visible text to ensure it does raise.

Copilot uses AI. Check for mistakes.
if body_text:
body_lower = body_text.lower()
if any(phrase in body_lower for phrase in [
Expand Down
Loading