Zenno Action for waiting on specific port

zenrast

Client
Регистрация
20.03.2013
Сообщения
57
Благодарностей
1
Баллы
8
Hi,

i would like to have a Zenno template controlled by an external action.
So i was thinking that it would be nice to have a functionality (action) that would stop the execution
of the template and wait on specific port (like http://localhost:123/zenno/command=apple) for a command to continue.

Is something like this possible in zenno (maybe as custom code)?
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 452
Благодарностей
5 910
Баллы
113
Not sure about port, but you can use WaitForUserAction method which allows user to stop the project and perform some actions manually, then continue.
 

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43
Instead of keeping a connection open you could check every once in a while if the data has changed.
True = proceed. False = check again in 60 seconds.
 

zenrast

Client
Регистрация
20.03.2013
Сообщения
57
Благодарностей
1
Баллы
8
Hi Tobbe,

i use a simillar solution now. It has 2 disadvantages.
a) First is that this takes computer resouces if you have 100 running instances all doing request all the time.
b) And the second is that if takes a long time to get a response even for a really simple scrap. So it would be great to have something where i could programatically call zenno.
 

Tobbe

Client
Регистрация
01.08.2013
Сообщения
428
Благодарностей
148
Баллы
43

zenrast

Client
Регистрация
20.03.2013
Сообщения
57
Благодарностей
1
Баллы
8
The best would be to be able to run Zennoposter as a server (for example like the Selenium server does). In that way i would send an API command to "open a browser etc." to Zennoposter and he would handle this and at the end return a response to my request.
Made up example code:
PHP:
<?php
$ZennoPosterServerBrowser = $Zenno->StartBrowser();
$results = $ZennoPosterServerBrowser->StartTemplate("Mytemplate")->Input("inputdata");
echo $results;
?>
This would be very benefitial for some fast any quick scrapping where i need the results verry fast.
 

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