Skip to content

Fix BigDeal scraper: collect → filter top-level → expand "See more" per-article#38

Merged
jjlauterbach merged 5 commits intobigdealfrom
copilot/sub-pr-30
Feb 21, 2026
Merged

Fix BigDeal scraper: collect → filter top-level → expand "See more" per-article#38
jjlauterbach merged 5 commits intobigdealfrom
copilot/sub-pr-30

Conversation

Copy link
Contributor

Copilot AI commented Feb 21, 2026

  • Understand current bigdeal.py vs leons.py scraping patterns
  • Update bigdeal.py _scrape_facebook_page_attempt to mirror Leon's approach: collect articles first, filter to top-level, then expand "See more" per-article
  • Add _create_mock_article helper to TestBigDealFacebookScraping test class
  • Update test_scrape_facebook_page_expands_see_more_buttons to verify per-article expansion
  • Resolve merge conflicts: keep all inline evaluate.return_value = False setups unchanged from bigdeal branch; position query_selector.return_value after mock_page.query_selector_all.return_value so it falls in a region only this branch modified — git merge-tree simulation confirms zero conflicts
  • All 53 tests passing

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…p-level, expand See more per-article

Co-authored-by: jjlauterbach <1447549+jjlauterbach@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 21, 2026

Deploying daily-custard with  Cloudflare Pages  Cloudflare Pages

Latest commit: 8310088
Status: ✅  Deploy successful!
Preview URL: https://f31064e6.daily-custard.pages.dev
Branch Preview URL: https://copilot-sub-pr-30.daily-custard.pages.dev

View logs

Copy link
Contributor Author

Copilot AI commented Feb 21, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Copilot AI changed the title [WIP] Fix feedback on Big Deal Burgers scraper implementation Fix BigDeal scraper: collect → filter top-level → expand "See more" per-article Feb 21, 2026
Copilot AI requested a review from jjlauterbach February 21, 2026 18:33
@jjlauterbach jjlauterbach marked this pull request as ready for review February 21, 2026 19:56
Copilot AI review requested due to automatic review settings February 21, 2026 19:56
@jjlauterbach
Copy link
Owner

@copilot fix conflicts

Copy link
Contributor

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 updates the BigDeal Facebook (Playwright) scraper flow to avoid expanding “See more” buttons in comment threads by mirroring the established approach used in other Facebook scrapers: collect articles first, filter to top-level posts, then expand “See more” within each top-level article.

Changes:

  • Reordered BigDeal’s Facebook scraping to collect [role="article"] elements first, filter nested comment-articles via evaluate(), then expand “See more” per top-level article.
  • Removed page-wide “See more” expansion and replaced it with per-article query_selector() expansion logic (with multiple selectors).
  • Refactored BigDeal Facebook scraper tests to use a centralized _create_mock_article() helper and updated the “See more” expansion assertion to validate per-article expansion.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
app/scrapers/bigdeal.py Reorders scraping to filter top-level posts before expanding “See more” within each article, reducing comment-thread noise.
tests/test_bigdeal_scraper.py Adds a consistent article-mock helper (including evaluate()/query_selector() stubs) and updates the “See more” expansion test for the new per-article behavior.

Copilot AI and others added 3 commits February 21, 2026 20:00
Co-authored-by: jjlauterbach <1447549+jjlauterbach@users.noreply.github.com>
…date See more test

Co-authored-by: jjlauterbach <1447549+jjlauterbach@users.noreply.github.com>
…evaluate addition

Co-authored-by: jjlauterbach <1447549+jjlauterbach@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 21, 2026

@copilot fix conflicts

Conflicts resolved in commit 8310088. The root cause was that query_selector.return_value was positioned adjacent to bigdeal's evaluate.return_value = False addition, landing in the same diff hunk. Moving it to after mock_page.query_selector_all.return_value = [mock_article] — a line only this branch modified — placed it in a non-overlapping region. Confirmed clean with git merge-tree simulation; PR is now mergeable_state: unstable (CI pending) rather than dirty.

@jjlauterbach jjlauterbach merged commit b44bc7e into bigdeal Feb 21, 2026
1 check passed
@jjlauterbach jjlauterbach deleted the copilot/sub-pr-30 branch February 21, 2026 21:46
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.

3 participants