Filtering & choosing random search results?

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
This is a question regarding search results from Google.

Sometimes I get only a few search results from G that aren't any good for my purpose. My questions are:

1) How do I set ZP to reject search results under a certain amount, i.e. 3?

2) If there are more than 3 results, how do I choose a random search result (say from the usual 1 - 10)?
 

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
Save your results to list. Then do list processing and get row count. Then logic branch if row count < specified amount do something else. If more than specified amount another list processing and pull random line from list.
 

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
Saving to list & row count is working, but am having problems with the IF part. Here is what I've put:

Код:
{-Variable.google_row_count-}<3
Keep getting an error when it hits the IF part (Result:False).

Here's a template if anyone's interested:

Посмотреть вложение 2974
 

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
As a side question; does anyone know if under List processing > Get line > Random, you can specify a range that is randomized (i.e. between 2 - 10)?
 

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 712
Баллы
113
No. You should use sublist action within list processings. And copy/move range from one list to another.
 

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28

bigcajones

Client
Регистрация
09.02.2011
Сообщения
1 216
Благодарностей
683
Баллы
113
The problem with your logic operation is that you have both actions following it coming off of Successful Execution. If there is an action attached below another one like you have here with the goto ebay, that is a successful exit. You also have a successful exit coming off of the logic branch going to the Alert. Can't happen.

Disconnect the GoTo Url from the logic action and attach an Unsuccessful exit to it from the logic branch...

Посмотреть вложение saveGoogleURLs.xmlz
 
  • Спасибо
Реакции: vulkan и shabbysquire

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
The problem with your logic operation is that you have both actions following it coming off of Successful Execution. If there is an action attached below another one like you have here with the goto ebay, that is a successful exit. You also have a successful exit coming off of the logic branch going to the Alert. Can't happen.

Disconnect the GoTo Url from the logic action and attach an Unsuccessful exit to it from the logic branch...

Посмотреть вложение 2976
Thanks for that, this has solved the If problem.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)