Closed (fixed)
Project:
Amazon Product Advertisement API
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Apr 2011 at 20:14 UTC
Updated:
21 Nov 2012 at 17:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
shawn dearmond commentedThe issue here is that the generate script is searching Amazon, finding a random item, and then searching Amazon again for the next node.
Of course, what's being searched is the same keyword: "drupal" over and over and over again. There are only so many items that come up when you search for "drupal", which is why duplicates are appearing.
Here's one solution: instead of a single keyword to search for, let's have it randomly select one of, say, 10. That will diversify the results a bit, but it won't completely remove the possibility of a duplicate.
See attached patch.
I also changed the search from "Blended" to "All", so search results are far far more relevant. (And I get the impression that it's faster, though I haven't timed it with a stopwatch.)
Comment #2
rfayCommitted: fc48d5506c77064438c7b30a4ba2c92d955fe821
Comment #3
rfayLet's go back and pick this up in D6 as well please.
Comment #4
rfayHere's another view of this. This time I used a single keyword that's guaranteed to generate a lot of things, and actually keep track of where we are in generating. It's not elegant, but you get unique items, and pretty much as many as you want.
Committed: f599c0c39f9f16e2e20a066d7ed17a3144e1ed3d
Comment #5
rfayNow we could take the both of these back to D6.
Comment #6
the_g_bomb commentedThis looked to be already implemented in D6.
All this patch does is set the default variables to the same values as the D7 version.
Committed 987ca21 to 6.x-1.x