My macro copies too much

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.

Moderators: Community Moderators, iMacros Moderators

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.

My macro copies too much

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

Return to Data Extraction and Web Screen Scraping

Who is online

Users browsing this forum: Bing [Bot] and 5 guests

-->