Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

newegg changed

  • Loading branch information...
commit 4593e416c2b748bf98bd8d4486171c1375233d8d 1 parent be656e4
Paul Tarjan authored

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. +4 4 newegg/newegg.search.xml
8 newegg/newegg.search.xml
@@ -11,8 +11,7 @@
11 11 <inputs>
12 12 <key id="query" type="xs:string" paramType="query" required="true" />
13 13 <key id="order" type="xs:string" paramType="query" default="PRICE" />
14   - <key id="subcategory" type="xs:string" paramType="query" default=""/>
15   - <key id="category" type="xs:string" paramType="query" default=""/>
  14 + <key id="N" type="xs:string" paramType="query" default=""/>
16 15 </inputs>
17 16 <execute><![CDATA[
18 17 var result = <result/>;
@@ -50,7 +49,7 @@ function fixItem(item) {
50 49 return item;
51 50 }
52 51
53   -var url = "http://www.newegg.com/Product/ProductList.aspx?Submit=ENE&Description=" + (query) + "&Order=" + order + "&Subcategory=" + subcategory + "&Category=" + category + "&Pagesize=100&Page=1";
  52 +var url = "http://www.newegg.com/Product/ProductList.aspx?Submit=ENE&Description=" + (query) + "&Order=" + order + "&N=" + N + "&Pagesize=100&Page=1";
54 53
55 54 var tries = 0;
56 55 while (tries < 4) {
@@ -65,13 +64,14 @@ if (tries == 4)
65 64
66 65 fullpage = html;
67 66 // gcaProductCell == search page and synopsis == item
68   -html = y.xpath(html, "//div[@id='bcaProductCell']//div[@class='itemCell'] | //*[@class='alert'] | //div[@id='synopsis']");
  67 +html = y.xpath(html, "//div[@id='bcaProductCell']//div[@class='itemCell'] | //div[@id='synopsis']");
69 68
70 69 var good = true;
71 70 if (html.length() == 0) good = false;
72 71 if (html.(@['class'] == 'alert').length() != 0) {
73 72 good = false;
74 73 }
  74 +good = true;
75 75
76 76 // For the single product page
77 77 var root = html.(@['id'] == "synopsis");

0 comments on commit 4593e41

Please sign in to comment.
Something went wrong with that request. Please try again.