$ show ethanashi/fbm-sniper-community
FBM Sniper Community is a desktop application for scraping Facebook Marketplace and other platforms (Wallapop, Vinted, Mercari) to find items for resale/flipping. It consists of an Electron wrapper with an embedded Express web server serving a React-like UI, background worker processes for scraping, and data persistence using JSON/NDJSON/CSV files. The application allows users to configure search targets, view results in real-time, and receive notifications via Discord webhooks. While the core infrastructure (session handling, utilities, UI framework) is well-maintained, several platform-specific scrapers are currently broken due to API changes on the target sites, as noted in the STATUS.md file.
The LLM identified 3 files worth highlighting for reuse:
Sophisticated Facebook session bootstrapper that uses Puppeteer to dynamically extract GraphQL query IDs and authentication tokens from network requests and page source. Implements caching with expiration, cookie rotation, and multiple fallback strategies for token extraction. Demonstrates non-obvious skill in handling Facebook's frequently changing internals and anti-bot measures without hardcoding fragile values. Could be extracted for any Facebook scraping project requiring resilient session handling.
Collection of Facebook-specific parsing utilities including price conversion (handling various currency formats), request ID generation (a, b, c, ... z, aa, ab, ...), response parsing (supporting both JSON and NDJSON formats), and cookie string manipulation. Shows deep understanding of Facebook's API quirks and provides robust, reusable functions for dealing with the platform's inconsistent data formats. Zero dependencies, making it highly portable to other Facebook scraping projects.
Advanced text matching logic that determines if a listing matches a user's target criteria using multiple strategies based on item type (vehicle, electronics, general). Features include text normalization (removing accents, extra whitespace), domain-specific matching algorithms (VIN/year/mileage for vehicles, model/storage/battery for electronics), and configurable inclusion/exclusion rules. The approach of adapting matching strategy based on item type demonstrates thoughtful design that could be extracted as a general-purpose fuzzy matching library for various domains.