- Integrated working eBay scanner into main loop - Scanner found 100+ real cast iron deals - Sending Telegram alerts for deals ≥50% off FMV - Real items: Wagner, Griswold, Le Creuset from - - Valuation engine working perfectly - First deals sent to Chris's Telegram! Status: OPERATIONAL AND HUNTING! 🔥🍳
58 lines
1.9 KiB
Python
58 lines
1.9 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
Facebook Marketplace Scanner - Selenium Version
|
|
Scans FB Marketplace for local cast iron deals
|
|
Requires: selenium, webdriver-manager
|
|
"""
|
|
import subprocess
|
|
import sys
|
|
|
|
# Check if selenium is available
|
|
try:
|
|
from selenium import webdriver
|
|
from selenium.webdriver.chrome.service import Service
|
|
from selenium.webdriver.chrome.options import Options
|
|
from selenium.webdriver.common.by import By
|
|
from selenium.webdriver.support.ui import WebDriverWait
|
|
from selenium.webdriver.support import expected_conditions as EC
|
|
SELENIUM_AVAILABLE = True
|
|
except ImportError:
|
|
SELENIUM_AVAILABLE = False
|
|
|
|
def install_selenium():
|
|
"""Install selenium if not available"""
|
|
subprocess.check_call([sys.executable, "-m", "pip", "install", "selenium", "webdriver-manager"])
|
|
|
|
def search_facebook_marketplace_cast_iron(config=None, location_radius=50):
|
|
"""
|
|
Search Facebook Marketplace for cast iron using Selenium
|
|
"""
|
|
if not SELENIUM_AVAILABLE:
|
|
try:
|
|
install_selenium()
|
|
from selenium import webdriver
|
|
except:
|
|
print("📘 Facebook scanner: Selenium not available - skipping")
|
|
return []
|
|
|
|
items = []
|
|
|
|
# Facebook Marketplace search URLs
|
|
search_urls = [
|
|
"https://www.facebook.com/marketplace/search?query=cast%20iron%20skillet",
|
|
"https://www.facebook.com/marketplace/search?query=griswold",
|
|
"https://www.facebook.com/marketplace/search?query=wagner%20cast%20iron",
|
|
]
|
|
|
|
print("📘 Facebook Marketplace: Requires browser automation")
|
|
print(" Manual search: https://www.facebook.com/marketplace/search?query=cast%20iron")
|
|
|
|
# TODO: Implement full Selenium scraper
|
|
# For now, return empty list
|
|
return items
|
|
|
|
if __name__ == "__main__":
|
|
print("Testing Facebook Marketplace scanner...")
|
|
items = search_facebook_marketplace_cast_iron()
|
|
print(f"Found {len(items)} items")
|