Skip to content

Release 0.1.2

Choose a tag to compare

@PhuNguyenPT PhuNguyenPT released this 04 May 03:20
· 25 commits to master since this release
948a54b

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 no sku or url. 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_url routing to correctly hit parse_product instead of the listing parser.
    • Always use response.url as product_url instead of the unreliable LD+JSON url field.
    • Extract product name from og:title (not GTM block) on campaign pages, where GTM data can belong to a different product.
    • Set sku=None on campaign pages where no reliable SKU exists.
    • Set in_stock=False when price=0 (pre-launch pages).

dienmayxanh spider

  • Fix price=0 bug: Guard LD+JSON price fallback with a > 0 check.
  • Improve unavailability detection: Added UNAVAILABLE_STATUSES constant; switched to substring matching to handle prefixed status variants. Added Khong kinh doanh to the set.
  • Fix start_url routing: Detect product vs. category URLs by path depth so direct product URLs bypass parse_category_page.
  • Optimization: Pass data-productstatus via meta from parse_listing.
  • Helpers: Improved parse_discount to guard against val=0 and handle int parsing edge cases.

Node.js

  • Pinned Node.js to v24.15.0 via .nvmrc and engines field in both frontend and frontend-template packages.

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