My macro copies too much

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
agnes
Posts: 1
Joined: Thu Dec 22, 2016 8:29 pm

My macro copies too much

Post by agnes » Thu Dec 22, 2016 8:39 pm

Hello,

I just created my first macro and it seems doing a little bit too much. I need to automate the following task: copy a cell from a csv file, paste it to google.com/finances search area, get search result, scroll down, copy industry and sector and paste this info to the csv file. My issue is that my macro seems copying everything from the web page and I get industry and sector just on the line 498 of my csv file.
And I have a couple more questions: how could I avoid it throws me an error if google doesn't find anything, or it runs into an empty cell on my csv file?
I will really appreciate your help.

My macros is bellow:

Code: Select all

VERSION BUILD=11.5.498.2403
TAB T=1
TAB CLOSEALLOTHERS
SET !PLAYBACKDELAY 0.2
SET !DATASOURCE "C:\\Users\\Agne\\Desktop\\bandymas\\kitas_failas.csv"
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
URL GOTO=google.com/finance
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:q CONTENT={{!COL1}}
TAG POS=1 TYPE=BUTTON:SUBMIT ATTR=ID:gbqfb
TAG POS=10 TYPE=DIV ATTR=CLASS:g-unit<SP>g-first EXTRACT=TXT
SAVEAS TYPE=TXT FOLDER= C:\\Users\\Agne\\Documents\\imacros FILE=naujas.csv
Post Reply