How to Set Proper Attributes & Loop Results to Extract .CSV

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.

How to Set Proper Attributes & Loop Results to Extract .CSV

by JG2 on Wed Jun 19, 2013 3:53 pm

Version of iMacros: Version 8.03.2216 (Trial)
Operation System: XP
Browser: FF 20.1 includes iMacros add-on

I have the following working script below, which works for the first set of data that I'm extracting to .csv.
NOTE: I'm also looping through URL's which works.

The problem that I'm having is assigning the right tags for my text attributes to loop through results and extract. I know pretty basic stuff, but then again I'm new with iMacros. I've shifted through the manuals and can't quite grasp my 2nd iMacros. What would really help me out is; if someone could provide me a working set of attributes base on my script this way I know what I'm looking for when I inspect the elements of a webpage. Please don't send me to a link. Help The Guy Out! :D


Code: Select all
VERSION BUILD=8032216
SET !ERRORIGNORE YES
SET !REPLAYSPEED FAST
SET !DATASOURCE Chamber_New.csv
SET !DATASOURCE_COLUMNS 1
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
TAB T=1
URL GOTO={{!COL1}}
TAG POS=1 TYPE=A FORM=NAME:form1 ATTR=HREF:http://members.austinchamber.com/Landscaping-Services EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}
SET !EXTRACT NULL
TAG POS=1 TYPE=A FORM=NAME:form1 ATTR=TXT:Landscaping<SP>&<SP>Services&&STYLE:BORDER-BOTTOM:<SP>medium<SP>none;<SP>BORDER-LEFT:<SP>medium<SP>none;<SP>BORDER-TOP:<SP>medium<SP>none;<SP>*&&HREF:http://members.austinchamber.com/Landscaping-Services
TAG POS={{!LOOP}} TYPE=A FORM=NAME:form1 ATTR=HREF:http://members.austinchamber.com/Landscaping-Services/ABC-Home-Commercial-Servi* EXTRACT=TXT
SET !VAR2 {{!EXTRACT}}
SET !EXTRACT NULL
TAG POS={{!LOOP}} TYPE=DIV FORM=NAME:form1 ATTR=CLASS:ListingResults_Level3_PHONE1 EXTRACT=TXT
SET !VAR3 {{!EXTRACT}}
SET !EXTRACT NULL

'
SET !EXTRACT NULL
ADD !EXTRACT {{!VAR1}}
ADD !EXTRACT {{!VAR2}}
ADD !EXTRACT {{!VAR3}}
SAVEAS TYPE=EXTRACT FOLDER=* FILE=Chamber_New.csv
SET !EXTRACT NULL
JG2
 
Posts: 6
Joined: Fri Nov 16, 2012 4:33 am

Return to Data Extraction and Web Screen Scraping

Who is online

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

-->