Release 0.1.2
Summary
This PR fixes data accuracy bugs in the thegioididong and dienmayxanh spiders,
and standardizes the Node.js version to v24.15.0 across frontend packages.
Changes
thegioididong spider
- Skip generic category pages: Category pages (e.g.
/dtdd-oppo) embed a Product LD+JSON with noskuorurl. Added early-return guards in both the normal and GTM fallback paths to prevent bad data from being yielded. - Fix campaign page data corruption:
- Fixed
start_urlrouting to correctly hitparse_productinstead of the listing parser. - Always use
response.urlasproduct_urlinstead of the unreliable LD+JSONurlfield. - Extract product name from
og:title(not GTM block) on campaign pages, where GTM data can belong to a different product. - Set
sku=Noneon campaign pages where no reliable SKU exists. - Set
in_stock=Falsewhenprice=0(pre-launch pages).
- Fixed
dienmayxanh spider
- Fix
price=0bug: Guard LD+JSON price fallback with a> 0check. - Improve unavailability detection: Added
UNAVAILABLE_STATUSESconstant; switched to substring matching to handle prefixed status variants. AddedKhong kinh doanhto the set. - Fix
start_urlrouting: Detect product vs. category URLs by path depth so direct product URLs bypassparse_category_page. - Optimization: Pass
data-productstatusviametafromparse_listing. - Helpers: Improved
parse_discountto guard againstval=0and handle int parsing edge cases.
Node.js
- Pinned Node.js to
v24.15.0via.nvmrcandenginesfield in bothfrontendandfrontend-templatepackages.
Changelog
- 948a54b Merge pull request #42 from PhuNguyenPT:phunpt
- 7b58a7b fix(thegioididong): skip category pages with generic Product LD+JSON
- 9c33726 fix(thegioididong): fix campaign page data corruption and routing bugs
- 00ecadc fix: price/in_stock accuracy for unavailable products in dienmayxanh spider
- 9a2614d update(frontend): use node 24.15.0 for engine
- 9666406 chore(frontend): update .nvmrc to Node.js v24.15.0
- 7e3532f chore: set engines to require Node.js >=24.15.0
- 6a994ea chore: add .nvmrc to pin Node.js v24.15.0