Capturing EXTRACT data

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 Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.
Post Reply
Raisins
Posts: 3
Joined: Thu May 25, 2017 5:25 pm

Capturing EXTRACT data

Post by Raisins » Thu May 25, 2017 5:36 pm

iMacros Version V. 844
Browser Google Chrome versions is: 58.0.3029.110 (64-bit)
Operating System macOS Sierra V. 10.12.5
Included Demos work ok (all of them)

Also tried briefly on a Windows 10 system with Chrome with the same results. All demos worked.


Is there a way to put user-entered data into a variable?

I had been using PROMPT to capture user input data as a variable...

PROMPT "Please enter text:" !VAR1

Unfortunately, PROMPT no longer works with the latest Chrome update.

I've come up with the following workaround that EXTRACTs the user input from an html form I created. But I can't pass that data along because EXTRACT is not a variable and IEXTRACT does not work within a TAG. I've spent a lot of time with this and I haven't found a way to do this. Is there a way to load TAG EXTRACT'd data into a variable?

This is what I am trying to do...

URL GOTO=C:\Users\username\Desktop\FormTest.html
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=NAME:abc EXTRACT=TXT

SET !VAR1 {{!EXTRACT}}

TAB OPEN NEW
TAB T=2
URL GOTO=http://www.forvo.com/word/{{!VAR1}}/#ar

No luck with this, even though I found some demo samples that said it should work.

Any suggestions would be appreciated. Thank you.
iimfun
Posts: 239
Joined: Tue Jul 19, 2016 1:06 pm

Re: Capturing EXTRACT data

Post by iimfun » Sat May 27, 2017 6:18 am

Raisins wrote:I had been using PROMPT to capture user input data as a variable...

PROMPT "Please enter text:" !VAR1

Unfortunately, PROMPT no longer works with the latest Chrome update.
I encountered the same problem. Here is my workaround for that

Code: Select all

SET !VAR1 EVAL("prompt('Please enter text:');")
PROMPT {{!VAR1}}
Raisins
Posts: 3
Joined: Thu May 25, 2017 5:25 pm

Re: Capturing EXTRACT data - CLOSED

Post by Raisins » Sat May 27, 2017 12:27 pm

Thank you. This works
chivracq
Posts: 7971
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Capturing EXTRACT data

Post by chivracq » Sat May 27, 2017 1:43 pm

Raisins wrote:

Code: Select all

iMacros Version V. 844
Browser Google Chrome versions is: 58.0.3029.110 (64-bit)
Operating System macOS Sierra V. 10.12.5
Included Demos work ok (all of them)

Also tried briefly on a Windows 10 system with Chrome with the same results. All demos worked.


Is there a way to put user-entered data into a variable?

I had been using PROMPT to capture user input data as a variable...

Code: Select all

PROMPT "Please enter text:" !VAR1
Unfortunately, PROMPT no longer works with the latest Chrome update.

I've come up with the following workaround that EXTRACTs the user input from an html form I created. But I can't pass that data along because EXTRACT is not a variable and IEXTRACT does not work within a TAG. I've spent a lot of time with this and I haven't found a way to do this. Is there a way to load TAG EXTRACT'd data into a variable?

This is what I am trying to do...

Code: Select all

URL GOTO=C:\Users\username\Desktop\FormTest.html
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:form1 ATTR=NAME:abc EXTRACT=TXT 

SET !VAR1 {{!EXTRACT}}

TAB OPEN NEW
TAB T=2
URL GOTO=http://www.forvo.com/word/{{!VAR1}}/#ar
No luck with this, even though I found some demo samples that said it should work.

Any suggestions would be appreciated. Thank you.
iimfun wrote:
Raisins wrote:I had been using PROMPT to capture user input data as a variable...

Code: Select all

PROMPT "Please enter text:" !VAR1
Unfortunately, PROMPT no longer works with the latest Chrome update.
I encountered the same problem. Here is my workaround for that

Code: Select all

SET !VAR1 EVAL("prompt('Please enter text:');")
PROMPT {{!VAR1}}
Raisins wrote:Thank you. This works
Hum..., for Cross-Browser Compatibility, @iimfun's Workaround will NOT work on FF (tested on v8.8.2 and v8.9.7 for FF: => "ReferenceError: prompt is not defined, line 5 (Error code: -1001)"), see the following 2 related Threads for other Workarounds that should(?) work in all Browsers...:
- Displaying window.alert()
- PROMPT Messagebox - Yes - No - Cancel (end)
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
Post Reply