YQL returning duplicate entries

27 views Asked by At

YQL query: https://developer.yahoo.com/yql/console/#h=select+date%2Ctitle%2Clink+from+rss+where+url%3D%22http%3A%2F%2Fauburn.craigslist.org%2Fsearch%2Fweb%3Fformat%3Drss%22

YQL is returning two nodes for each result, so results[0] and results[1] are the same, 2 and 3 are the same, so on and so forth.

Anyone else had this issue?

1

There are 1 answers

0
S16 On

Was able to find the answer only after posting this. The solution, for those that end up here, is to append your query with the following:

 | unique(field="link", hideRepeatCount="true");

where 'link' is whatever field you want to be unique.

Note: The pipe is necessary, and this is posted at the end of the YQL query like so:

select date,title,link from rss where url="http://auburn.craigslist.org/search/web?format=rss" | unique(field="link", hideRepeatCount="true");