Extract Point Changes - How do I Extract Text

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
harry@accufrate.com
Posts: 4
Joined: Sun Jul 21, 2013 11:11 pm

Extract Point Changes - How do I Extract Text

Post by harry@accufrate.com » Sat Mar 11, 2017 6:13 pm

Hello,

I'm having an issue with a extract point for my macro. When I change the search parameter the site is returning the data in a different point and I am unable to extract the information.

This is the first macro where the search parameter is 50288578 and the extract point is the last line below.

Code: Select all

VERSION BUILD=9002379
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=https://www.rrts.com/Pages/Home.aspx
TAG POS=2 TYPE=I FORM=ACTION:/Pages/Home.aspx ATTR=CLASS:icon-tasks
WAIT SECONDS=1
TAG POS=2 TYPE=INPUT:RADIO FORM=ACTION:/Tools/Tracking/Pages/default.aspx ATTR=NAME:ctl00$ctl51$g_58aef1dd_2091_421b_99ff_86b055c64d8b$Type CONTENT=YES
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/Tools/Tracking/Pages/default.aspx ATTR=NAME:ctl00$ctl51$g_58aef1dd_2091_421b_99ff_86b055c64d8b$rptPRO$ctl00$rtbPRO CONTENT=50288578
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:BUTTON FORM=ACTION:/Tools/Tracking/Pages/default.aspx ATTR=NAME:ctl00$ctl51$g_58aef1dd_2091_421b_99ff_86b055c64d8b$cmdSubmit
WAIT SECONDS=10
TAG POS=1 TYPE=SPAN FORM=ACTION:/Tools/Tracking/Pages/MultipleResults.aspx?PUNS=NTAyODg1Nzg= ATTR=ID:ctl00_ctl51_g_a00bf657_07a9_444e_9b38_fb00487e0952_TraceResultID50288578_lblPro* EXTRACT=TXT


This is the second macro where the search parameter is 50288721 and the extract point is the last line below.

Code: Select all

VERSION BUILD=9002379
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=https://www.rrts.com/Pages/Home.aspx
TAG POS=2 TYPE=I FORM=ACTION:/Pages/Home.aspx ATTR=CLASS:icon-tasks
WAIT SECONDS=1
TAG POS=2 TYPE=INPUT:RADIO FORM=ACTION:/Tools/Tracking/Pages/default.aspx ATTR=NAME:ctl00$ctl51$g_58aef1dd_2091_421b_99ff_86b055c64d8b$Type CONTENT=YES
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/Tools/Tracking/Pages/default.aspx ATTR=NAME:ctl00$ctl51$g_58aef1dd_2091_421b_99ff_86b055c64d8b$rptPRO$ctl00$rtbPRO CONTENT=50288721
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:BUTTON FORM=ACTION:/Tools/Tracking/Pages/default.aspx ATTR=NAME:ctl00$ctl51$g_58aef1dd_2091_421b_99ff_86b055c64d8b$cmdSubmit
WAIT SECONDS=10
TAG POS=1 TYPE=SPAN FORM=ACTION:/Tools/Tracking/Pages/MultipleResults.aspx?PUNS=NTAyODg3MjE= ATTR=ID:ctl00_ctl51_g_a00bf657_07a9_444e_9b38_fb00487e0952_TraceResultID50288721_lblPro* EXTRACT=TXT

Notice that the extract line is in a different place.

Marco 1

Code: Select all

TAG POS=1 TYPE=SPAN FORM=ACTION:/Tools/Tracking/Pages/MultipleResults.aspx?PUNS=NTAyODg1Nzg= ATTR=ID:ctl00_ctl51_g_a00bf657_07a9_444e_9b38_fb00487e0952_TraceResultID50288578_lblPro* EXTRACT=TXT
Macro 2

Code: Select all

TAG POS=1 TYPE=SPAN FORM=ACTION:/Tools/Tracking/Pages/MultipleResults.aspx?PUNS=NTAyODg3MjE= ATTR=ID:ctl00_ctl51_g_a00bf657_07a9_444e_9b38_fb00487e0952_TraceResultID50288721_lblPro* EXTRACT=TXT
As a result I am unable to automate this from code if I make the search parameter a variable and try to repeat the macro by just changing the search parameter.

How do I adjust for this so that I am always able to extract the data regardless of the search parameter?

Thank you in advance for you help.

Harry.
chivracq
Posts: 9004
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Extract Point Changes - How do I Extract Text

Post by chivracq » Sat Mar 11, 2017 10:29 pm

harry@accufrate.com wrote:Hello,

I'm having an issue with a extract point for my macro. When I change the search parameter the site is returning the data in a different point and I am unable to extract the information.

This is the first macro where the search parameter is 50288578 and the extract point is the last line below.

Code: Select all

VERSION BUILD=9002379
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=https://www.rrts.com/Pages/Home.aspx
TAG POS=2 TYPE=I FORM=ACTION:/Pages/Home.aspx ATTR=CLASS:icon-tasks
WAIT SECONDS=1
TAG POS=2 TYPE=INPUT:RADIO FORM=ACTION:/Tools/Tracking/Pages/default.aspx ATTR=NAME:ctl00$ctl51$g_58aef1dd_2091_421b_99ff_86b055c64d8b$Type CONTENT=YES
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/Tools/Tracking/Pages/default.aspx ATTR=NAME:ctl00$ctl51$g_58aef1dd_2091_421b_99ff_86b055c64d8b$rptPRO$ctl00$rtbPRO CONTENT=50288578
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:BUTTON FORM=ACTION:/Tools/Tracking/Pages/default.aspx ATTR=NAME:ctl00$ctl51$g_58aef1dd_2091_421b_99ff_86b055c64d8b$cmdSubmit
WAIT SECONDS=10
TAG POS=1 TYPE=SPAN FORM=ACTION:/Tools/Tracking/Pages/MultipleResults.aspx?PUNS=NTAyODg1Nzg= ATTR=ID:ctl00_ctl51_g_a00bf657_07a9_444e_9b38_fb00487e0952_TraceResultID50288578_lblPro* EXTRACT=TXT
This is the second macro where the search parameter is 50288721 and the extract point is the last line below.

Code: Select all

VERSION BUILD=9002379
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=https://www.rrts.com/Pages/Home.aspx
TAG POS=2 TYPE=I FORM=ACTION:/Pages/Home.aspx ATTR=CLASS:icon-tasks
WAIT SECONDS=1
TAG POS=2 TYPE=INPUT:RADIO FORM=ACTION:/Tools/Tracking/Pages/default.aspx ATTR=NAME:ctl00$ctl51$g_58aef1dd_2091_421b_99ff_86b055c64d8b$Type CONTENT=YES
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/Tools/Tracking/Pages/default.aspx ATTR=NAME:ctl00$ctl51$g_58aef1dd_2091_421b_99ff_86b055c64d8b$rptPRO$ctl00$rtbPRO CONTENT=50288721
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:BUTTON FORM=ACTION:/Tools/Tracking/Pages/default.aspx ATTR=NAME:ctl00$ctl51$g_58aef1dd_2091_421b_99ff_86b055c64d8b$cmdSubmit
WAIT SECONDS=10
TAG POS=1 TYPE=SPAN FORM=ACTION:/Tools/Tracking/Pages/MultipleResults.aspx?PUNS=NTAyODg3MjE= ATTR=ID:ctl00_ctl51_g_a00bf657_07a9_444e_9b38_fb00487e0952_TraceResultID50288721_lblPro* EXTRACT=TXT
Notice that the extract line is in a different place.

Marco 1

Code: Select all

TAG POS=1 TYPE=SPAN FORM=ACTION:/Tools/Tracking/Pages/MultipleResults.aspx?PUNS=NTAyODg1Nzg= ATTR=ID:ctl00_ctl51_g_a00bf657_07a9_444e_9b38_fb00487e0952_TraceResultID50288578_lblPro* EXTRACT=TXT
Macro 2

Code: Select all

TAG POS=1 TYPE=SPAN FORM=ACTION:/Tools/Tracking/Pages/MultipleResults.aspx?PUNS=NTAyODg3MjE= ATTR=ID:ctl00_ctl51_g_a00bf657_07a9_444e_9b38_fb00487e0952_TraceResultID50288721_lblPro* EXTRACT=TXT
As a result I am unable to automate this from code if I make the search parameter a variable and try to repeat the macro by just changing the search parameter.

How do I adjust for this so that I am always able to extract the data regardless of the search parameter?

Thank you in advance for you help.

Harry.
Hum..., long time no seen on the Forum since 2013, ah-ah...! :D

1- FCIM for this current Thread for me to have a look, even if you put some nice Effort in your Post...
=> iMacros for FF v9.0.3(...?), FF51/52...?, OS...?

2- + Add some Question Mark to your Thread Title, you are asking a Qt and not sharing a HowTo...

3- And, hum..., not really "impressed", your previous Thread from nearly 4 years ago is still waiting for some Follow-up / mini-Thanks for TechSupport from your Side, that doesn't motivate much to want to help you (again) I'm afraid, if you don't have any "Forum Etiquette"...! :shock:
When you open a Thread, you are expected it follow it up, and eventually to finish it a bit neatly and useful for other Users by sharing your Solution as well... :idea:
=> Would be nice if you could finish that older Thread of yours a bit "correctly", ah-ah...! :idea:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply