Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
nicer name, and real shipping
  • Loading branch information
ptarjan committed Dec 2, 2010
1 parent cbbf143 commit 4a2cb77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions newegg/newegg.search.xml
Expand Up @@ -77,15 +77,15 @@ if (html.(@['class'] == 'alert').length() != 0) {
var root = html.(@['id'] == "synopsis");
if (root.length() != 0) {
var item = <item/>;
item.name = <name>{root..div.(@['class']=="grpDesc boxConstraint")..h1[0].text()}</name>;
item.name = <name>{root..div.(@['class']=="grpDesc boxConstraint")..h1[0].text().toString().replace(/\W+/g, ' ')}</name>;
var link = fullpage..link.(@rel=="canonical").@href.toString();
var itemCode = link.match(/Item=[^&]+/)[0].replace("Item=", "");
item.itemCode = <itemCode>{itemCode}</itemCode>
var priceNode = root..div.(@id=="singleFinalPrice").p;
item.price = <price>{priceNode.text() + priceNode.span.text()}</price>;
item.shipping = <shipping>{root..div.(@id=="synShipping").text()}</shipping>;
item.shipping = <shipping>{root..div.(@id=="synShipping").p.text()}</shipping>;
item.image = <image>{root..img.(@id=="mainSlide_0").@src}</image>;
y.log(root..div.(@id=="mainSlide"));
Expand Down

0 comments on commit 4a2cb77

Please sign in to comment.