Oliver Paton
Oliver Paton

Reputation: 49

Imacros.... start a new line in a data extraction CSV file

I currently have the following macro:

VERSION BUILD=9002379
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=http://www.bbc.co.uk/food/recipes/chocolate_and_orange_87739
ADD !EXTRACT {{!URLCURRENT}}
TAG POS=1 TYPE=DIV ATTR=CLASS:article-title EXTRACT=TXT
TAG POS=1 TYPE=DIV ATTR=ID:ingredients EXTRACT=TXT
ADD INTERNAL {{#NEWLINE#}}
URL GOTO=http://www.bbc.co.uk/food/recipes/secret_squirrel_cake_49338
ADD !EXTRACT {{!URLCURRENT}}
TAG POS=1 TYPE=DIV ATTR=CLASS:article-title EXTRACT=TXT
TAG POS=1 TYPE=DIV ATTR=ID:ingredients EXTRACT=TXT
SAVEAS TYPE=EXTRACT FOLDER=C:\Data_Extract_BBC FILE=Ollytest1.csv

I want this to write to a new line for each URL I hit, but in the file it puts them both on the same line. Is there a command to start new line?

That's the main question. My other question is... how can I get Imacro's to crawl the whole of the site and take the recepies off every page where they exist? Some pages may not have recepies on. I cant find a list on the sitemap of the URL's and the URL's are not just numbers. How can I make Imacros explore links on the site?

Upvotes: 2

Views: 8774

Answers (2)

user3230655
user3230655

Reputation: 41

To start a new line you can do this:

ADD !VAR1 <BR>

Upvotes: 4

Bestmacros
Bestmacros

Reputation: 1867

code example

VERSION BUILD=9002379
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=http://www.bbc.co.uk/food/recipes/chocolate_and_orange_87739
ADD !EXTRACT {{!URLCURRENT}}
TAG POS=1 TYPE=DIV ATTR=CLASS:article-title EXTRACT=TXT
TAG POS=1 TYPE=DIV ATTR=ID:ingredients EXTRACT=TXT
SAVEAS TYPE=EXTRACT FOLDER=C:\Data_Extract_BBC FILE=Ollytest1.csv
set !extract null
URL GOTO=http://www.bbc.co.uk/food/recipes/secret_squirrel_cake_49338
ADD !EXTRACT {{!URLCURRENT}}
TAG POS=1 TYPE=DIV ATTR=CLASS:article-title EXTRACT=TXT
TAG POS=1 TYPE=DIV ATTR=ID:ingredients EXTRACT=TXT
SAVEAS TYPE=EXTRACT FOLDER=C:\Data_Extract_BBC FILE=Ollytest1.csv

Upvotes: 3

Related Questions