How can I copy a variable text ?

antoinefdc

Новичок
Регистрация
30.08.2018
Сообщения
19
Благодарностей
3
Баллы
3
Hey guys !

I'm creating a bot that can use results from a form to copy it on another website.

Of course the results are never the same

So how can I copy a variable text into another page ?

Thank you for your time.

 

zortexx

Client
Регистрация
19.09.2011
Сообщения
2 520
Благодарностей
1 226
Баллы
113
Hey guys !

I'm creating a bot that can use results from a form to copy it on another website.

Of course the results are never the same

So how can I copy a variable text into another page ?

Thank you for your time.

Put the values into variables with regular expressions or xPath and use on another page.

If you don't have time to learn but have a budget you can order template.
 

antoinefdc

Новичок
Регистрация
30.08.2018
Сообщения
19
Благодарностей
3
Баллы
3
I have time no problem with that.

Could you please show me what does it look like ?
I didn't find everything about your answer.
 

zortexx

Client
Регистрация
19.09.2011
Сообщения
2 520
Благодарностей
1 226
Баллы
113

antoinefdc

Новичок
Регистрация
30.08.2018
Сообщения
19
Благодарностей
3
Баллы
3

zortexx

Client
Регистрация
19.09.2011
Сообщения
2 520
Благодарностей
1 226
Баллы
113
I already looked at this page, unfortunaly it doesn't answer to my problem.
The problem is that you do not know how to use the program you bought (or just find).
Read the documentation, try to find free video lessons, or just buy training course.
As I see, you need training from basics.
Luck!
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113

antoinefdc

Новичок
Регистрация
30.08.2018
Сообщения
19
Благодарностей
3
Баллы
3
To get text from element on webpage, use Actions Designer - Get>Value.
Find more details here - https://zennolab.com/wiki/en:action_constructor

Or you can parse text from webpage with regular expressions:
https://zennolab.com/wiki/en:creating-a-regular-expressions
For this you should take html code of webpage and create regex to take required text from it.

I know how to do this, I already tried it and it doesn't work.

If you use Actions Designer it will recognize the same text every time.
and I will never have the same text on the webpage.

Will try with Regexp thanks.
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113
But yes, regex is better. You can take code of a webpage and copy it to regex constructor in PM.
Parsing_with_regex.png
 
  • Спасибо
Реакции: antoinefdc

antoinefdc

Новичок
Регистрация
30.08.2018
Сообщения
19
Благодарностей
3
Баллы
3
I did it ! Thanks for the help guys.

I will show you the steps to do it, for YOU who are reading this :
1 - Open your web browser (Mozilla Firefox or Google Chrome)
2 - Go on the page where you need to find a variable text.
3 - Right click on the text, "Inspect the element" (FIRST SCREENSHOT)
4 - Go on the top of the HTML "block" (the last arrow which shows the bottom)
5 - Right click on the line with the arrow, and "Copy the exterior of the HTML"




6 - Come back on Zennoposter, click on the button on the top of Zennopoter's web browser (SECOND SCREENSHOT) (source: VladZen)
7 - Select "DOM-text" if unselected
8 - Click on "Copy to regex designer"




9 - Now the regex designer is opened. (THIRD SCREENSHOT)
10 - Paste the HTML in the box named "Before search text"
11 - At the end of the code you will have the variable text + the "end" code (</span></div> in this case)
Let's say you have APPLE BANANA<div>
Delete APPLE BANANA
12 - Take the end code that was after APPLE BANANA, cut it from "Before search text"
and paste it in "After search text" box
13 - Click on the checkboxes "Enable line breaks" and "Shortest match"
14 - Click on Test
15 - Now the result appeared on the right. Awesome !
Now you just have to copy the whole code in "Regular expression text" box and close the window
16 - In your Zennoposter project do a right click Tabs>Data
17 - Click on the checkbox "Parse result"
18 - Paste the code you copied on Regexp
19 - Choose a variable to save the result
20 - Annnd it's done ! WOOHOO you did it !

Now your bot is able to take text in an area no matter what it is (: .

 
  • Спасибо
Реакции: VladZen

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113
I did it ! Thanks for the help guys.

I will show you the steps to do it, for YOU who are reading this :
1 - Open your web browser (Mozilla Firefox or Google Chrome)
2 - Go on the page where you need to find a variable text.
3 - Right click on the text, "Inspect the element" (FIRST SCREENSHOT)
4 - Go on the top of the HTML "block" (the last arrow which shows the bottom)
5 - Right click on the line with the arrow, and "Copy the exterior of the HTML"




6 - Come back on Zennoposter, click on the button on the top of Zennopoter's web browser (SECOND SCREENSHOT) (source: VladZen)
7 - Select "DOM-text" if unselected
8 - Click on "Copy to regex designer"




9 - Now the regex designer is opened. (THIRD SCREENSHOT)
10 - Paste the HTML in the box named "Before search text"
11 - At the end of the code you will have the variable text + the "end" code (</span></div> in this case)
Let's say you have APPLE BANANA<div>
Delete APPLE BANANA
12 - Take the end code that was after APPLE BANANA, cut it from "Before search text"
and paste it in "After search text" box
13 - Click on the checkboxes "Enable line breaks" and "Shortest match"
14 - Click on Test
15 - Now the result appeared on the right. Awesome !
Now you just have to copy the whole code in "Regular expression text" box and close the window
16 - In your Zennoposter project do a right click Tabs>Data
17 - Click on the checkbox "Parse result"
18 - Paste the code you copied on Regexp
19 - Choose a variable to save the result
20 - Annnd it's done ! WOOHOO you did it !

Now your bot is able to take text in an area no matter what it is (: .

Well done!

You know what? We added parse-helper feature in new version for easy parsing. Check it here.
 
  • Спасибо
Реакции: antoinefdc

antoinefdc

Новичок
Регистрация
30.08.2018
Сообщения
19
Благодарностей
3
Баллы
3
  • Спасибо
Реакции: VladZen

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