Selective Search and Export to CSV

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
Loki899
Posts: 1
Joined: Sun Mar 27, 2016 9:10 pm

Selective Search and Export to CSV

Post by Loki899 » Mon Mar 28, 2016 12:41 am

Hello Team,

Firstly, thanks a million for making iMacros. Its the best thing I found to manage my work. I will skip to the query.

Please help me with the problem I am facing. I have reviewed many (really lot of) articles on this forum but my lack of knowledge in programming makes it very tough to understand the technical jargons used, or direct info provided without any explanations on why something needs to be where.

I am sorry, I could not find/understand how to find and sort selective data from one page,, and extract into selected(dedicated) columns to manage my portfolio.
[I use firefox(45.0.1)+iMacros plugin(just installed plugin yesterday so it should be the most/latest available. I use Windows7. I am clueless on programming and hence request you to kindly help me with some comments for the iMacros script that will be shown.]

I have been trying to extract data from only 2 columns of this webpage for randomly selected stocks from this link:
https://www1.nseindia.com/live_market/d ... market.htm

Now the code starts like this:
URL GOTO=https://www1.nseindia.com/live_market/d ... market.htm
‘ The second command below is to be sorting the table by the symbol so that I can review later easily.
TAG POS=1 TYPE=A ATTR=TXT:Symbol

{{Above, the link is first opened and then I sort the table by the Symbol (alphabetically)}}

The problem is when I make an iMarco by selecting the column in the table, it gets a POS<ID> today, and tomorrow it may change.

[For example, when I select ‘BHEL’ as shown below, I get  TAG POS=124 TYPE=TD ATTR=* EXTRACT=TXT. The problem is the POS124 keeps changing dynamically and there is no way to track them. It can happen monthly or weekly, that the POS124 becomes POS138 tomorrow for that stock.]

I am looking for a few things as listed below:
• The iMacro should automatically search for the term ‘BHEL’ in the first column and then pull its value(from price column), irrespective of the POS<ID> it holds for this month/week.
• If I decide to monitor 5 stocks(like shown below in red), the iMacros should automatically push the time-stamp in column1 and then populate the 5stocks’ values in col2/3/4/5/6.
• The iMacros should run until the system time becomes 3PM.

Please suggest what scripts need to be added.

Here is a screenshot of the 2 columns.
259.jpg
I would be very very grateful to have any help or suggestions on this one.

Thank you!
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Selective Search and Export to CSV

Post by chivracq » Mon Mar 28, 2016 4:42 am

Loki899 wrote:Hello Team,

Firstly, thanks a million for making iMacros. Its the best thing I found to manage my work. I will skip to the query.

Please help me with the problem I am facing. I have reviewed many (really lot of) articles on this forum but my lack of knowledge in programming makes it very tough to understand the technical jargons used, or direct info provided without any explanations on why something needs to be where.

I am sorry, I could not find/understand how to find and sort selective data from one page,, and extract into selected(dedicated) columns to manage my portfolio.
[I use

Code: Select all

firefox(45.0.1)
+iMacros plugin(just installed plugin yesterday so it should be the most/latest available. 
I use Windows7.
I am clueless on programming and hence request you to kindly help me with some comments for the iMacros script that will be shown.]

I have been trying to extract data from only 2 columns of this webpage for randomly selected stocks from this link:
https://www1.nseindia.com/live_market/d ... market.htm

Now the code starts like this:

Code: Select all

URL GOTO=https://www1.nseindia.com/live_market/dynaContent/live_watch/pre_open_market/pre_open_market.htm
‘ The second command below is to be sorting the table by the symbol so that I can review later easily.

Code: Select all

TAG POS=1 TYPE=A ATTR=TXT:Symbol
{{Above, the link is first opened and then I sort the table by the Symbol (alphabetically)}}

The problem is when I make an iMarco by selecting the column in the table, it gets a POS<ID> today, and tomorrow it may change.

[For example, when I select ‘BHEL’ as shown below, I get  TAG POS=124 TYPE=TD ATTR=* EXTRACT=TXT. The problem is the POS124 keeps changing dynamically and there is no way to track them. It can happen monthly or weekly, that the POS124 becomes POS138 tomorrow for that stock.]

I am looking for a few things as listed below:
• The iMacro should automatically search for the term ‘BHEL’ in the first column and then pull its value(from price column), irrespective of the POS<ID> it holds for this month/week.
• If I decide to monitor 5 stocks(like shown below in red), the iMacros should automatically push the time-stamp in column1 and then populate the 5stocks’ values in col2/3/4/5/6.
• The iMacros should run until the system time becomes 3PM.

Please suggest what scripts need to be added.

Here is a screenshot of the 2 columns.
259.jpg
I would be very very grateful to have any help or suggestions on this one.

Thank you!
OK, managed to find your FCI in order to read your Post, quick reading, I have the feeling you might need "Relative Positioning"... I'll have a (real/deeper) look after some sleep... Bump your Thread if I or nobody else replied...
FCIM...! => Probably iMacros for FF v8.9.6.
- (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...
Post Reply