feat(scraping): Implement real-time StockX market price scraping#129
Open
mrunmayeekokitkar wants to merge 1 commit into
Open
feat(scraping): Implement real-time StockX market price scraping#129mrunmayeekokitkar wants to merge 1 commit into
mrunmayeekokitkar wants to merge 1 commit into
Conversation
- Add puppeteer-extra with stealth plugin for anti-bot bypass - Implement scrapeStockX function with headless browser - Add exponential backoff retry mechanism for resilience - Update runAllScrapers to use real scraper instead of fake data - Add unique constraint on MarketPrice (sku, size, marketplace) for upsert - Store askPrice, bidPrice, and lastSold from StockX
|
@mrunmayeekokitkar is attempting to deploy a commit to the participationcorner2025-8967's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Codesense Ai: This PR is too large to review automatically. A human maintainer will take a look! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
Implements real-time StockX market price scraping by replacing placeholder market data with live pricing collected through a headless browser. The scraper includes anti-bot protections, automatic retries with exponential backoff, and database upsert support for reliable market price updates.
Related Issues
Fixes #122
Type of Change
Changes
Real-Time StockX Scraper
puppeteer-extrawith the stealth plugin for improved anti-bot detection bypass.scrapeStockXfunction using a headless browser.Retry & Resilience
fetchWithRetryhelper.Market Price Updates
runAllScrapersto use the new real-time StockX scraper.Database
Updated
prisma/schema.prisma:This enables reliable upsert operations without duplicate market price records.
Dependencies
Added the following packages:
puppeteerpuppeteer-extrapuppeteer-extra-plugin-stealthImplementation Summary
app/services/scrapers/index.tsscrapeStockXfunction using a headless browser.fetchWithRetrywith exponential backoff.runAllScrapersto use live StockX data instead of randomly generated values.try/catch.prisma/schema.prismaskusizemarketplaceto support database upsert operations.
package.jsonAdded dependencies:
puppeteerpuppeteer-extrapuppeteer-extra-plugin-stealthScraper Workflow
The scraper now:
Checklist
Screenshots (if applicable)
N/A