Zenno Action for waiting on specific port

  • Автор темы Автор темы zenrast
  • Дата начала Дата начала

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)?
 
Not sure about port, but you can use WaitForUserAction method which allows user to stop the project and perform some actions manually, then continue.
 
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.
 
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.
 
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.
 

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