Changelog
[Unreleased] - 2025-10-08
Fixed
Parent/Child ASIN Data Extraction : Fixed issue where scraper would miss product data for child ASINs when Amazon stores data at parent level
Added extraction of parent_asin from page JavaScript data
Added extraction of variations data (all available colors, sizes, styles)
Scraper now identifies parent-child ASIN relationships automatically
This solves the issue where features/descriptions are stored at parent level, not child level
ASIN Data Inconsistency Detection : Added validation to detect when Amazon redirects to a different product variant
Added extract_asin_from_url() function to extract ASIN from request URL
Added validate_asin parameter (default: true) to enable/disable ASIN validation
Scraper now compares requested ASIN with scraped ASIN and logs warnings on mismatch
Added ASIN_Mismatch_Warning field to info_table when mismatch is detected
Added
New output fields :
parent_asin: The parent ASIN if product is a variation (empty string for standalone products)
variations: Dictionary of available variation options (e.g., {"color_name": ["Black", "White"], "size_name": ["S", "M", "L"]})
New input parameter validateAsin (Boolean, default: true) to control ASIN validation
Warning logs when ASIN mismatch is detected
ASIN_Mismatch_Warning field in output's info_table for easy detection of variant redirects
Test script test_asin_validation.py to verify ASIN validation functionality
Changed
Updated Product TypedDict to include parent_asin and variations fields
Updated README.md with parent/child ASIN handling documentation
Updated README.md with ASIN validation documentation and examples
Enhanced logging to show parent ASIN and variation data when found
Enhanced logging to show ASIN mismatches with clear warning messages
Example
When requesting child ASIN https://amazon.com/dp/B0122GXLQO:
Before fix :
Returned incomplete data (missing features, wrong ASIN)
No indication of parent-child relationship
After fix :
Extracts parent ASIN: B0FDLYFFW4
Extracts all variations: {"style_name": ["Pack of 1", "Pack of 12"], "color_name": ["Purple", "Black", "White", ...]}
Logs: Found parent ASIN: B0FDLYFFW4
Logs: Found variation data: ['style_name', 'color_name']
Output includes complete parent/child relationship data