Skip to content

Commit

Permalink
Merge pull request #256 from hyeeyoung/dev
Browse files Browse the repository at this point in the history
[hotfix] 무신사 파싱 로직 (아이템 가격) 수정
  • Loading branch information
hyejungg authored Sep 9, 2023
2 parents daf8b4a + a8303d2 commit 277e643
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,21 @@ const parsingForMusinsa = async (url) => {
switch (ogTag) {
case 'title':
itemName = ogValue;
priceValue = ogValue.split(' ');
break;
case 'image':
if (!itemImg) {
itemImg = ogValue;
}
break;
case 'description': {
priceValue = ogValue;
const matchPrice = priceValue.match(/\d{1,3}(,\d{3})*/g);
itemPrice = matchPrice[matchPrice.length - 1];
break;
}
}
}
});
itemPrice = priceValue[priceValue.length - 3];
}
});
itemPrice = itemPrice ? getPriceWithoutString(itemPrice) : undefined;
Expand Down

0 comments on commit 277e643

Please sign in to comment.