Hi,

I'm trying to create an ubiquity search command for webpage www.skapiec.pl
(it compares prices in stores).

The webpage displays two different results depending whether the query
returns one record for the product or several records, e.g. :

a)  for query "noctua" it returns the list http://www.skapiec.pl/Noctua.html
b) and for query "noctua p12" - one record http://www.skapiec.pl/Noctua.html
and http://www.skapiec.pl/site/cat/73/comp/364577).

I managed to create two separate search commands per each result:

1) CmdUtils.makeSearchCommand({
name: "skapiec.pl-search",
author: { name: "wookash" },
description: "Searches skapiec.pl engine",
license: "MPL",

url: "http://www.skapiec.pl/szukaj/w_calym_serwisie/{QUERY}";,
parser:  {      container: "div.p_row",
                title: "span.entry-title a",
                preview: "div.soffer",
                thumbnail: "div.simg"}

});

2) CmdUtils.makeSearchCommand({
name: "skapiec.pl-search",
author: { name: "wookash" },
description: "Searches skapiec.pl engine",
license: "MPL",

url: "http://www.skapiec.pl/szukaj/w_calym_serwisie/{QUERY}";,
parser:  {      container: "div.content",
           title: "table",
           preview: "p",
           thumbnail: "a.prodGalleryAnchor"}

});

However, I do not know how to dynamically change the parser values
(container, title, preview and thumbnail) depending on the query so
that preview showed results at all times. Currently for command 1)
preview will display records when the page displays several records
(query a)) and command 2) displays preview when result is one record
only (query b)).

Can you please advise?

-- 
You received this message because you are subscribed to the Google Groups 
"ubiquity-firefox" group.
To post to this group, send email to ubiquity-fire...@googlegroups.com.
To unsubscribe from this group, send email to 
ubiquity-firefox+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/ubiquity-firefox?hl=en.

Reply via email to