- Регистрация
- 26.07.2013
- Сообщения
- 15
- Благодарностей
- 2
- Баллы
- 3
Hello,
I scrape different pages each with different no of elements (div's with class='test' ) with the help of action designer. How can i know how many elements we have on each page?
Then i want to set a index and add each element to a list, but how can i know how many elements i have on each page ?
I give you an ex. in PHP maybe is more clear:
$index = 0;
//step 1
if($index < count($nr_of_elelments)){
//do something
$index++;
//go back to step 1
}else{
//do something else
}
I am interested on getting count($nr_of_elelments)
Anyone knows how to do this?
I scrape different pages each with different no of elements (div's with class='test' ) with the help of action designer. How can i know how many elements we have on each page?
Then i want to set a index and add each element to a list, but how can i know how many elements i have on each page ?
I give you an ex. in PHP maybe is more clear:
$index = 0;
//step 1
if($index < count($nr_of_elelments)){
//do something
$index++;
//go back to step 1
}else{
//do something else
}
I am interested on getting count($nr_of_elelments)
Anyone knows how to do this?