Web Extracting imacros

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

Web Extracting imacros

Post by lulupatel » Sat Oct 27, 2018 2:35 am

I am extracting data from URL using imacro... its working perfect inside URL html there is one User ID detail . i want to extract that, but don't know what should i write code for that

Here is my URL

https://www.justdial.com/mumbai/Aakar-A ... I5M1_BZDET

And here bellow is my imacro code

Code: Select all

VERSION BUILD=10022823
TAB T=1
SET !DATASOURCE infos.csv
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
SET !ERRORIGNORE YES
SET ABC {{!COL3}}

TAB CLOSEALLOTHERS
SET !TIMEOUT_PAGE 25
URL GOTO={{!COL3}}

SET !EXTRACT_TEST_POPUP NO

SET !TIMEOUT_STEP 0
TAG POS=1 TYPE=SPAN ATTR=CLASS:fn EXTRACT=TXT
TAG POS=3 TYPE=SPAN ATTR=CLASS:lng_add EXTRACT=TXT
TAG POS=1 TYPE=a ATTR=ID:whatsapptriggeer EXTRACT=HREF
TAG POS=3 TYPE= button ATTR=onclick:* EXTRACT=HREF
ADD !EXTRACT {{!URLCURRENT}}
SAVEAS TYPE=EXTRACT FOLDER=* FILE=Extract.csv
In this code I think there are some problems here:

Code: Select all

TAG POS=3 TYPE= button ATTR=onclick:* EXTRACT=HREF
What I want to extract used ID. Please you can see in this image.
Image
chivracq
Posts: 7722
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Web Extracting imacros

Post by chivracq » Sat Oct 27, 2018 7:49 am

lulupatel wrote:I am extracting data from URL using imacro... its working perfect inside URL html there is one User ID detail . i want to extract that, but don't know what should i write code for that

Here is my URL

https://www.justdial.com/mumbai/Aakar-A ... I5M1_BZDET

And here bellow is my imacro code

Code: Select all

VERSION BUILD=10022823
TAB T=1
SET !DATASOURCE infos.csv
SET !LOOP 1
SET !DATASOURCE_LINE {{!LOOP}}
SET !ERRORIGNORE YES
SET ABC {{!COL3}}

TAB CLOSEALLOTHERS
SET !TIMEOUT_PAGE 25
URL GOTO={{!COL3}}

SET !EXTRACT_TEST_POPUP NO

SET !TIMEOUT_STEP 0
TAG POS=1 TYPE=SPAN ATTR=CLASS:fn EXTRACT=TXT
TAG POS=3 TYPE=SPAN ATTR=CLASS:lng_add EXTRACT=TXT
TAG POS=1 TYPE=a ATTR=ID:whatsapptriggeer EXTRACT=HREF
TAG POS=3 TYPE= button ATTR=onclick:* EXTRACT=HREF
ADD !EXTRACT {{!URLCURRENT}}
SAVEAS TYPE=EXTRACT FOLDER=* FILE=Extract.csv
In this code I think there are some problems here:

Code: Select all

TAG POS=3 TYPE= button ATTR=onclick:* EXTRACT=HREF
What I want to extract used ID. Please you can see in this image.
Image
Maybe you can first follow up on your previous Thread from 3.5 years ago... and bump this one again in 2022 if you didn't find any Solution in the meantime...? :idea:

(Thread Title for this current one is a bit "useless" btw (= Non-Descriptive), try searching the Forum using "web+extracting+imacros", your Solution is absolutely-positively-certainly among the Results... Good luck...! :roll: )
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
Post Reply