Looping through URL Cls

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
lulupatel
Posts: 2
Joined: Sun Mar 29, 2015 11:41 pm

Looping through URL Cls

Post by lulupatel » Mon Mar 30, 2015 12:11 am

Dear Sir any one can help me how can Loop through Multipal URL in Csv

Code: Select all

VERSION BUILD=10022823

'
SET !ERRORIGNORE YES
SET !EXTRACT_TEST_POPUP NO
SET !DATASOURCE "C:\Users\Lalitpatel\Desktop\Book1.csv"
SET !DATASOURCE_COLUMNS 1
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}

TAB T=1
TAB URL GOTO={{!COL1}}
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:bus_name EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:bui_name EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:street_name EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:lan_name EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:are_name EXTRACT=TXT
ONDIALOG POS=1 BUTTON=YES
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:city_name EXTRACT=TXT
TAG POS=1 TYPE=SELECT ATTR=NAME:pin_name EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:sta_name EXTRACT=TXT
TAG POS=1 TYPE=A FORM=NAME:os_home ATTR=TXT:Contact<SP>Information
TAG POS=1 TYPE=SELECT ATTR=* EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:contact_person_name EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:contact_person_designation EXTRACT=TXT
TAG POS=1 TYPE=SPAN ATTR=ID:std_code EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:lan_num[] EXTRACT=TXT
TAG POS=4 TYPE=SPAN ATTR=* EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:mob_name[] EXTRACT=TXT
TAG POS=5 TYPE=SPAN ATTR=* EXTRACT=TXT
TAG POS=2 TYPE=INPUT:TEXT ATTR=NAME:mob_name[] EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:email_id EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:website EXTRACT=TXT
SAVEAS TYPE=EXTRACT FOLDER=* FILE=Data.csv
WAIT SECONDS=1

I am getting Error 1200

as my URL is two long

thanks in advance
chivracq
Posts: 8636
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Looping through URL Cls

Post by chivracq » Mon Mar 30, 2015 11:49 pm

lulupatel wrote:Dear Sir any one can help me how can Loop through Multipal URL in Csv

Code: Select all

VERSION BUILD=10022823
'
SET !ERRORIGNORE YES
SET !EXTRACT_TEST_POPUP NO
SET !DATASOURCE "C:\Users\Lalitpatel\Desktop\Book1.csv"
SET !DATASOURCE_COLUMNS 1
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}

TAB T=1
TAB URL GOTO={{!COL1}}
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:bus_name EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:bui_name EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:street_name EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:lan_name EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:are_name EXTRACT=TXT
ONDIALOG POS=1 BUTTON=YES
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:city_name EXTRACT=TXT
TAG POS=1 TYPE=SELECT ATTR=NAME:pin_name EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:sta_name EXTRACT=TXT
TAG POS=1 TYPE=A FORM=NAME:os_home ATTR=TXT:Contact<SP>Information
TAG POS=1 TYPE=SELECT ATTR=* EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:contact_person_name EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:contact_person_designation EXTRACT=TXT
TAG POS=1 TYPE=SPAN ATTR=ID:std_code EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:lan_num[] EXTRACT=TXT
TAG POS=4 TYPE=SPAN ATTR=* EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:mob_name[] EXTRACT=TXT
TAG POS=5 TYPE=SPAN ATTR=* EXTRACT=TXT
TAG POS=2 TYPE=INPUT:TEXT ATTR=NAME:mob_name[] EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:email_id EXTRACT=TXT
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:website EXTRACT=TXT
SAVEAS TYPE=EXTRACT FOLDER=* FILE=Data.csv
WAIT SECONDS=1
I am getting Error 1200

as my URL is two long

thanks in advance
1- I don't understand the "Cls" in your Thread Title...

2- Your Config is not clear to me, are you using the iMacros Browser or iMacros for IE...? => IE v?, OS?

3- Wondering whom that "Sir" is intended for, we welcome Women on the Forum as well...! :roll:

4- Mention the Complete RuntimeError...

5- How long are your URL's? Give an example...

6- Your Script looks very specific for 1 same Web-Site, if your URL's are too long, there is probably some common part to all of them that you could hard-code and remove from the DataSource.... Or split them into 2 Columns...

7- Do you get the same Pb / RuntimeError if you hard-code one URL in the 'URL GOTO' or do you get the Pb only from DataSource...?
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply