fix: Correct imports in test_scraper CLI tool
- Import LogCapture from scraper module - Remove unused StructuredLogger import - Use correct log_capture parameter name Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -66,13 +66,10 @@ def main():
|
|||||||
|
|
||||||
# Import scraper
|
# Import scraper
|
||||||
from seleniumbase import Driver
|
from seleniumbase import Driver
|
||||||
from scrapers.google_reviews.v1_0_0 import scrape_reviews
|
from scrapers.google_reviews.v1_0_0 import scrape_reviews, LogCapture
|
||||||
from utils.logger import StructuredLogger
|
|
||||||
|
|
||||||
# Set up logger
|
# Set up log capture
|
||||||
log = StructuredLogger(job_id=f"test_{int(time.time())}")
|
log_capture = LogCapture()
|
||||||
if args.verbose:
|
|
||||||
log.info('system', 'Verbose mode enabled')
|
|
||||||
|
|
||||||
# Track reviews for real-time progress
|
# Track reviews for real-time progress
|
||||||
reviews_collected = []
|
reviews_collected = []
|
||||||
@@ -98,7 +95,7 @@ def main():
|
|||||||
url=url,
|
url=url,
|
||||||
max_reviews=args.max,
|
max_reviews=args.max,
|
||||||
timeout_no_new=args.timeout,
|
timeout_no_new=args.timeout,
|
||||||
log=log,
|
log_capture=log_capture,
|
||||||
flush_callback=flush_callback,
|
flush_callback=flush_callback,
|
||||||
progress_callback=progress_callback,
|
progress_callback=progress_callback,
|
||||||
flush_batch_size=100
|
flush_batch_size=100
|
||||||
|
|||||||
Reference in New Issue
Block a user