feat: Cast Iron Scout multi-channel expansion
- Added Craigslist scanner framework - Added Facebook Marketplace placeholder - Updated main scanner to aggregate all sources - Added STATUS.md for development tracking - Fixed import paths for all scanners - Ready for HTML scraping implementation Current status: - eBay: RSS built but unreliable, need HTML scraping - Craigslist: Framework ready, debugging HTML parsing - Facebook: Placeholder (needs Selenium) - All sources tracked in unified scan loop
This commit is contained in:
@@ -9,6 +9,8 @@ import sys
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
from sources.ebay_scanner import search_ebay_cast_iron
|
||||
from sources.craigslist_scanner import search_craigslist_cast_iron
|
||||
from sources.facebook_scanner import search_facebook_marketplaceCast_iron
|
||||
from valuation import is_good_deal, calculate_fmv
|
||||
|
||||
SCRIPT_DIR = Path(__file__).parent
|
||||
@@ -80,14 +82,36 @@ def scan_all_sources():
|
||||
state = load_state()
|
||||
seen_links = set(state.get('seen_links', []))
|
||||
|
||||
all_items = []
|
||||
|
||||
# Scan eBay
|
||||
items = search_ebay_cast_iron()
|
||||
log(f"Found {len(items)} items on eBay")
|
||||
try:
|
||||
ebay_items = search_ebay_cast_iron()
|
||||
log(f"Found {len(ebay_items)} items on eBay")
|
||||
all_items.extend(ebay_items)
|
||||
except Exception as e:
|
||||
log(f"eBay scan error: {e}")
|
||||
|
||||
# Scan Craigslist
|
||||
try:
|
||||
cl_items = search_craigslist_cast_iron()
|
||||
log(f"Found {len(cl_items)} items on Craigslist")
|
||||
all_items.extend(cl_items)
|
||||
except Exception as e:
|
||||
log(f"Craigslist scan error: {e}")
|
||||
|
||||
# Scan Facebook Marketplace (placeholder for now)
|
||||
try:
|
||||
fb_items = search_facebook_marketplaceCast_iron(config)
|
||||
log(f"Found {len(fb_items)} items on Facebook Marketplace")
|
||||
all_items.extend(fb_items)
|
||||
except Exception as e:
|
||||
log(f"Facebook scan error: {e}")
|
||||
|
||||
deals_found = 0
|
||||
min_discount = config.get('min_discount_percent', 50)
|
||||
|
||||
for item in items:
|
||||
for item in all_items:
|
||||
# Skip if already seen
|
||||
if item['link'] in seen_links:
|
||||
continue
|
||||
@@ -110,7 +134,7 @@ def scan_all_sources():
|
||||
state['seen_links'] = list(seen_links)
|
||||
save_state(state)
|
||||
|
||||
log(f"Scan complete. Deals found: {deals_found}, Total items processed: {len(items)}")
|
||||
log(f"Scan complete. Deals found: {deals_found}, Total items processed: {len(all_items)}")
|
||||
return deals_found
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user