Scrape data to different columns

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
petrull
Posts: 4
Joined: Wed Apr 03, 2019 8:51 am

Scrape data to different columns

Post by petrull » Wed Apr 03, 2019 9:04 am

Hey!
i need to scrape this and other Products from different sites but what i need is to scrape the name of the Product (TAG POS=4 TYPE=DIV ATTR=CLASS:cellContent) into first column first row and then in the second column i need the price(TAG POS=1 TYPE=SPAN ATTR=ID:planSelectionPrice-1s ) to be. Then second Product second rown first coulumn and second price second row second column etcetc. please help i have been on this for a week now! it needs to be saved into csv-file.

Produkt1 Price1
Produkt2 Price2

Code: Select all

VERSION BUILD=11.0.246.4051
SET !EXTRACT_TEST_POPUP NO
SET !ERRORIGNORE YES
TAB T=1
TAB CLOSEALLOTHERS
1
URL GOTO=https://www.netflix.com/signup?locale=sv-SE
TAG POS=1 TYPE=BUTTON ATTR=TXT:VISA<SP>ABONNEMANG
WAIT SECONDS=1

*first Product and price

TAG POS=4 TYPE=DIV ATTR=CLASS:cellContent 
TAG POS=1 TYPE=SPAN ATTR=ID:planSelectionPrice-1s  

*second Product and price :

TAG POS=5 TYPE=DIV ATTR=CLASS:cellContent  
TAG POS=1 TYPE=SPAN ATTR=ID:planSelectionPrice-2s
Last edited by chivracq on Thu Sep 02, 2021 2:14 am, edited 1 time in total.
Reason: 2 ugly Typos corrected in Thread Title + Formatting added to Script.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Scrape data to different columns

Post by chivracq » Wed Apr 03, 2019 1:47 pm

petrull wrote:
Wed Apr 03, 2019 9:04 am
Hey!
i need to scrape this and other Products from different sites but what i need is to scrape the name of the Product (TAG POS=4 TYPE=DIV ATTR=CLASS:cellContent) into first column first row and then in the second column i need the price(TAG POS=1 TYPE=SPAN ATTR=ID:planSelectionPrice-1s ) to be. Then second Product second rown first coulumn and second price second row second column etcetc. please help i have been on this for a week now! it needs to be saved into csv-file.

Produkt1 Price1
Produkt2 Price2

Code: Select all

VERSION BUILD=11.0.246.4051
SET !EXTRACT_TEST_POPUP NO
SET !ERRORIGNORE YES
TAB T=1
TAB CLOSEALLOTHERS
1
URL GOTO=https://www.netflix.com/signup?locale=sv-SE
TAG POS=1 TYPE=BUTTON ATTR=TXT:VISA<SP>ABONNEMANG
WAIT SECONDS=1

*first Product and price

TAG POS=4 TYPE=DIV ATTR=CLASS:cellContent 
TAG POS=1 TYPE=SPAN ATTR=ID:planSelectionPrice-1s  

*second Product and price :

TAG POS=5 TYPE=DIV ATTR=CLASS:cellContent  
TAG POS=1 TYPE=SPAN ATTR=ID:planSelectionPrice-2s
:arrow: 2x Typos in your Thread Title, if you can correct them...?

FCIM...! :mrgreen: (Read my Sig...)
=> iMB/iMacros for IE v11.0, iMB/IE v...?, OS...?

Well, yep, what you want is very typical 'Data Extraction/Scraping' Functionality, it's all documented and explained in the Wiki in the 'Data Extraction' Section + Demo(s)..., what Problem are you encountering...? (Understanding the Concept/Principle takes a few minutes from/after reading this Wiki Page, not "i have been on this for a week now!"...! :shock: )

I don't see any 'EXTRACT' nor 'SAVEAS' Commands in your Script... This is very basic Functionality..., you should know by now, I would think, if you've been using iMacros for 3 years already, from the Version in your Script... :o
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Scrape data do different coulumns

Post by chivracq » Thu May 23, 2019 3:06 pm

And...?, any Follow-up, 7 weeks later...!?, as I see you happen to be checking the Forum/your Thread...! :roll:

(I won't try to help you, next time you'll open a Thread, if you don't follow up on your Threads and don't react to my Qt's/Requests/Remarks/Suggs, just saying... :idea: )
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
petrull
Posts: 4
Joined: Wed Apr 03, 2019 8:51 am

Re: Scrape data do different coulumns

Post by petrull » Mon Feb 24, 2020 9:26 am

chivracq wrote:
Thu May 23, 2019 3:06 pm
And...?, any Follow-up, 7 weeks later...!?, as I see you happen to be checking the Forum/your Thread...! :roll:

(I won't try to help you, next time you'll open a Thread, if you don't follow up on your Threads and don't react to my Qt's/Requests/Remarks/Suggs, just saying... :idea: )

Hello! sorry i did not get any message in my mail that this post was replyed to! i had a look on the wiki agen and this issue was resolved thank you! :)
Post Reply