Minggu, 07 Februari 2016

[smf_addin] Digest Number 3628

13 Messages

Digest #3628

Messages

Sat Feb 6, 2016 5:49 am (PST) . Posted by:

perseuslim11

Nvm the rounding Randy, is it possible to get the 52 week high value and the 52 week low value separately? in either one of these link:
Pentamaster Corp. Bhd http://www.marketwatch.com/investing/Stock/PENTA?countrycode=MY

http://www.marketwatch.com/investing/Stock/PENTA?countrycode=MY

Pentamaster Corp. Bhd http://www.marketwatch.com/investing/Stock/PENTA?countrycode=MY Updated stock quote for PENTA - including PENTA stock price today, earnings and estimates, stock charts, news, futures and other investing data.



View on www.marketwatch.com http://www.marketwatch.com/investing/Stock/PENTA?countrycode=MY
Preview by Yahoo



http://klse.i3investor.com/servlets/stk/7160.jsp http://klse.i3investor.com/servlets/stk/7160.jsp





Sat Feb 6, 2016 6:31 am (PST) . Posted by:

perseuslim11

other than the question above, is it possible to get only the revenue column and the profit att. to shareholder column from this table? (it is straight)
http://klse.i3investor.com/servlets/stk/fin/7160.jsp http://klse.i3investor.com/servlets/stk/fin/7160.jsp



Sat Feb 6, 2016 7:21 am (PST) . Posted by:

"Randy Harmelink" rharmelink

Try:

=smfGetTagContent("
http://www.marketwatch.com/investing/Stock/PENTA?countrycode=MY","p",2,"52
week low")
=smfGetTagContent("
http://www.marketwatch.com/investing/Stock/PENTA?countrycode=MY","p",2,"52
week high")

You need to learn how to do these yourself. You can't be asking me every
time you need a new data item...

On Sat, Feb 6, 2016 at 6:49 AM, perseuslim11@... wrote:

>
> Nvm the rounding Randy,
> is it possible to get the 52 week high value and the 52 week low value
> separately? in either one of these link:
> Pentamaster Corp. Bhd
> <http://www.marketwatch.com/investing/Stock/PENTA?countrycode=MY>
>

Sat Feb 6, 2016 7:24 am (PST) . Posted by:

"Randy Harmelink" rharmelink

Try:

=RCHGetTableCell("http://klse.i3investor.com/servlets/stk/fin/7160.jsp
",2,">Revenue",,,,2)
=RCHGetTableCell("http://klse.i3investor.com/servlets/stk/fin/7160.jsp
",3,">Revenue",,,,2)

...just increment that last parameter to get successive lines from the
table.

On Sat, Feb 6, 2016 at 7:31 AM, perseuslim11@... wrote:

>
> other than the question above, is it possible to get only the
> revenue column and the profit att. to shareholder column from this table?
> (it is straight)
> http://klse.i3investor.com/servlets/stk/fin/7160.jsp
>

Sat Feb 6, 2016 8:07 am (PST) . Posted by:

perseuslim11

ok, thanks Randy ^^ but how do I know which function to use for which type of data to pull?
can you point me in the direction to find where the "when-to-use-which-type-of-function" guide is?


Thanks ^^

Sat Feb 6, 2016 8:25 am (PST) . Posted by:

perseuslim11

I've just found the RChgetElementNumber.xls, however, inside there, there's no "last price" element available.., there's only one available from msn, however already obsolete....

please point me in the direction where i can find it, or where I can read more abt when to use which functions etc..
sorry for the trouble.. :)

Sat Feb 6, 2016 11:38 am (PST) . Posted by:

"Randy Harmelink" rharmelink

You would use RCHGetTableCell() if you need to extract something from a
table cell (e.g. <td>...</td>), or smfGetTagContent() if you need to
extract something from within any of a number of different HTML tags (e.g.
<span>...</span>). You'd need to use RCHGetWebData() if you need to grab
data from some string combination of data from the source code.

These days, I think smfGetTagContent() can do more than RCHGetTableCell(),
so you might even be better off just sticking with it.

You do need to examine the source code of the web page to see how the data
is presented.

On Sat, Feb 6, 2016 at 9:07 AM, perseuslim11@yahoo.com [smf_addin] <
smf_addin@yahoogroups.com> wrote:

>
> but how do I know which function to use for which type of data to pull?
> can you point me in the direction to find where the
> "when-to-use-which-type-of-function" guide is?
>
>

Sat Feb 6, 2016 5:48 pm (PST) . Posted by:

perseuslim11

=RCHGetHTMLTable( URL, Find Begin, Begin Direction, Find End, End Direction )


source code as below:
</script><div id=appbar class=appbar><div class=elastic><a class=appname href="/finance/?ei=Jim2VrHAD8e40gSyzb2QBg https://www.google.com/finance/?ei=Jim2VrHAD8e40gSyzb2QBg"><h2 class=appname>Finance</h2></a><div class=appbar-right><div role="button" class="goog-inline-block jfk-button jfk-button-action appbar-more" tabindex="0" action="/finance?noIL=1&q=KLSE:ccb&ei=Jim2VrHAD8e40gSyzb2QBg">More results</div></div><div class=appbar-center><div class=appbar-snippet-primary><span>Cycle & Carriage Bintang Berhad</span></div><div class=appbar-snippet-secondary><span>(KLSE:CCB)</span></div><div role="button" class="goog-inline-block jfk-button jfk-button-standard appbar-add" tabindex="0" action="/finance/portfolio?action=add&addticker=KLSE:CCB&ei=Jim2VrHAD8e40gSyzb2QBg">Add to portfolio</div></div></div></div><div class=elastic><div id=app class="g-section g-tpl-left-11p4em"><div class="g-unit g-first"><div id=gf-nav><div class=fjfe-nav-nav><ul class=fjfe-nav id=navmenu><li class="fjfe-nav-expanded fjfe-nav-selected">Company<li class=fjfe-nav-sub><a href="/finance?q=KLSE:CCB&ei=Jim2VrHAD8e40gSyzb2QBg https://www.google.com/finance?q=KLSE:CCB&ei=Jim2VrHAD8e40gSyzb2QBg">Summary</a><li class=fjfe-nav-sub><a href="/finance/company_news?q=KLSE:CCB&ei=Jim2VrHAD8e40gSyzb2QBg https://www.google.com/finance/company_news?q=KLSE:CCB&ei=Jim2VrHAD8e40gSyzb2QBg">News</a><li class=fjfe-nav-sub><div>Related companies</div><li class=fjfe-nav-sub><a href="/finance/historical?q=KLSE:CCB&ei=Jim2VrHAD8e40gSyzb2QBg https://www.google.com/finance/historical?q=KLSE:CCB&ei=Jim2VrHAD8e40gSyzb2QBg">Historical prices</a><li class=fjfe-nav-item><a href="/finance?ei=Jim2VrHAD8e40gSyzb2QBg https://www.google.com/finance?ei=Jim2VrHAD8e40gSyzb2QBg"><div>Markets</div></a><li class=fjfe-nav-item><a href="/finance/market_news?ei=Jim2VrHAD8e40gSyzb2QBg https://www.google.com/finance/market_news?ei=Jim2VrHAD8e40gSyzb2QBg"><div>News</div></a><li class=fjfe-nav-item><a href="/finance/portfolio?action=view&ei=Jim2VrHAD8e40gSyzb2QBg https://www.google.com/finance/portfolio?action=view&ei=Jim2VrHAD8e40gSyzb2QBg"><div>Portfolios</div></a><li class=fjfe-nav-item><a href="/finance/stockscreener?ei=Jim2VrHAD8e40gSyzb2QBg https://www.google.com/finance/stockscreener?ei=Jim2VrHAD8e40gSyzb2QBg"><div>Stock screener</div></a><li class=fjfe-nav-item><a href="/finance/domestic_trends?ei=Jim2VrHAD8e40gSyzb2QBg https://www.google.com/finance/domestic_trends?ei=Jim2VrHAD8e40gSyzb2QBg"><div>Google Domestic Trends</div></a></ul></div><div class="fjfe-recentquotes"><h4>Recent Quotes <span class="fjfe-recentquotes-duration">(<a href="//www.google.com/history?hl=en&authuser=0 https://www.google.com/history?hl=en&authuser=0">180 days</a>)</span></h4><div class=fjfe-recentquotes-noquote-notification>You have no recent quotes</div><div class=fjfe-recentquotes-quotes><div class="fjfe-toggle fjfe-toggle-button"><span class=fjfe-chg-toggle>chg</span> | <span class=fjfe-perc-toggle>%</span></div><div class=fjfe-table-div><table class=fjfe-recentquotes-table id=rq width=100%><tbody><tr><td class=symbol data-id="808011805219848"><a href="/finance?q=KLSE:PENTA&ei=Jim2VrHAD8e40gSyzb2QBg https://www.google.com/finance?q=KLSE:PENTA&ei=Jim2VrHAD8e40gSyzb2QBg"title="KLSE:PENTA">PENTA</a><td class=price><span id=ref_808011805219848_l>0.710</span><td class="change fjfe-toggle-button"><span class=fjfe-abs><span class=unchanged id=ref_808011805219848_c>0.00</span></span><span class=fjfe-perc><span class=unchanged id=ref_808011805219848_cp>0.00%</span></span><td class=del-btn><b class="del-btn-wrapper gf-table-delete" style="display:none"><img class="SP_delete button" alt="Remove PENTA from list" title="Remove PENTA from list" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="/></b><tbody><tr><td class=symbol data-id="311272313124927"><a href="/finance?q=KLSE:MAGNI&ei=Jim2VrHAD8e40gSyzb2QBg https://www.google.com/finance?q=KLSE:MAGNI&ei=Jim2VrHAD8e40gSyzb2QBg"title="KLSE:MAGNI">MAGNI</a><td class=price><span id=ref_311272313124927_l>4.21</span><td class="change fjfe-toggle-button"><span class=fjfe-abs><span class=up id=ref_311272313124927_c>+0.010</span></span><span class=fjfe-perc><span class=up id=ref_311272313124927_cp>0.24%</span></span><td class=del-btn><b class="del-btn-wrapper gf-table-delete" style="display:none"><img class="SP_delete button" alt="Remove MAGNI from list" title="Remove MAGNI from list" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="/></b></table></div></div></div></div></div><div class=g-unit id=gf-viewc><div class=fjfe-content>



What I entered was:
=RCHGetHTMLTable("https://www.google.com/finance/related?q=KLSE%3A"&TickerName&&quot;&ei=-3m0VqGeKo3fuASC3KrYDQ","KLSE:"&TickerName&"",-1,"",1)



but it still returns nothing..
-1 means find backwards
1 means one table only
what am I getting wrong? this is so confusing @.@




(sorry for the bold words, im not sure why everything became bold after i touch the bold button once, but tried to press it again to unbold but doesnt work T.T)





Sat Feb 6, 2016 6:31 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

Sorry, you can't use RCHGetHTMLTable() on Google pages. They don't code the
HTML tables completely. In general, they code the start of a table cell
(e.g. "<td>"), but not the ending of the table cell (e.g. "</td>").

Also, your search term is very common on the web page. The first place it
exists is on the title of the page. No where near any table.

I only see one table coded in the source code of the web page, and that's
the "Recent Quotes" table.

The data table you see displayed in the main part of the page is generated
from script code. So you'd have to extract the data out of it. Not trivial.
For example:

google.finance.data =
{common:{rq:{ct:""},up:"chg",down:"chr",linktargetInternal:"",hash:"SmhIdlplM2dEalA2ZGNhaThvNUwxaDJTY0drfDE0NTQ4MTE4MTU"},company:{related:{cols:[0,1,2,37,4,30,31,32,10,11,5,14,27,7,8,22,21,34,33,3],rows:[{id:"870389524668964",values:["CCB","Cycle
\u0026 Carriage Bintang
Berhad","KLSE","MYR","3.54","+0.09","2.61","","0.45","7.89","347.57M","0.00","6.42","11.90","22.16","2.95","4.17","chg","870389524668964","CCB"]},{id:"800510113019076",values:["PERMAJU","Permaju
Industries
Berhad","KLSE","MYR","0.145","0.000","0.00","","-0.03","","28.41M","0.00","18.78","0.71","0.14","1.31","3.70","chb","800510113019076","PERMAJU"]},{id:"1118103928338498",values:["MBMR","MBM
Resources
Berhad","KLSE","MYR","2.20","-0.04","-1.79","","0.27","8.18","875.19M","0.00","16.14","1.81","2.16","2.74","-0.08","chr","1118103928338498","MBMR"]},{id:"234027094944032",values:["LIONCOR","Lion
Corporation
Berhad","KLSE","MYR","0.0350","0.0000","0.00","","-0.47","","46.07M","0.00","66.99","-28.19","","-65.67","-45.83","chb","234027094944032","LIONCOR"]},{id:"155847958322083",values:["BJAUTO","Berjaya
Auto
Bhd","KLSE","MYR","2.21","0.00","0.00","","0.18","12.54","2.53B","0.02","0.00","26.83","44.69","10.30","13.08","chb","155847958322083","BJAUTO"]},{id:"571007783214498",values:["WATTA","Watta
Holding
Bhd","KLSE","MYR","0.340","-0.005","-1.45","","-0.01","","29.15M","0.00","4.02","-1.05","-1.29","-2.13","-1.80","chr","571007783214498","WATTA"]},{id:"746490883566305",values:["MINTYE","Mintye
Industries
Berhad","KLSE","MYR","1.26","0.00","0.00","","0.09","13.68","76.61M","0.00","0.00","7.78","8.33","16.86","21.53","chb","746490883566305","MINTYE"]},{id:"670118479571844",values:["SOLID","Solid
Automotive
Bhd","KLSE","MYR","1.36","-0.03","-2.16","","0.05","25.37","230.06M","0.01","7.55","7.03","9.14","8.01","11.80","chr","670118479571844","SOLID"]},{id:"1010549950128608",values:["HAPSENG","Hap
Seng Consolidated
Bhd","KLSE","MYR","7.39","+0.04","0.54","","0.44","16.74","16.54B","0.10","41.44","7.40","14.96","15.31","21.04","chg","1010549950128608","HAPSENG"]},{id:"387008959169645",values:["APM","APM
Automotive Hldgs.
Berhad","KLSE","MYR","3.73","0.00","0.00","","0.36","10.36","751.97M","0.00","3.17","3.03","3.33","4.47","5.90","chb","387008959169645","APM"]},{id:"469210152468278",values:["NHFATT","New
Hoong Fatt Hldgs.
Berhad","KLSE","MYR","2.65","0.00","0.00","","0.22","12.30","199.16M","0.00","6.27","5.44","6.47","9.85","17.18","chb","469210152468278","NHFATT"]}],visible_cols:[0,1,2,37,4,30,31,32,10,11,5,14,27,7,8,22,21]}},stickyUrlArgs:"\u0026ei=p6q2VrnMGOb8iwLFhIa4Aw"};

On Sat, Feb 6, 2016 at 6:48 PM, perseuslim11@yahoo.com [smf_addin] <
smf_addin@yahoogroups.com> wrote:

>
> * =RCHGetHTMLTable( URL, Find Begin, Begin Direction, Find End, End
> Direction )*
>
> *source code as below:*
>
> *</script><div id=appbar class=appbar><div class=elastic><a class=appname
> href="/finance/?ei=Jim2VrHAD8e40gSyzb2QBg
> <https://www.google.com/finance/?ei=Jim2VrHAD8e40gSyzb2QBg>"><h2
> class=appname>Finance</h2></a><div class=appbar-right><div role="button"
> class="goog-inline-block jfk-button jfk-button-action appbar-more"
> tabindex="0"
> action="/finance?noIL=1&q=KLSE:ccb&ei=Jim2VrHAD8e40gSyzb2QBg">More
> results</div></div><div class=appbar-center><div
> class=appbar-snippet-primary><span>Cycle & Carriage Bintang
> Berhad</span></div><div
> class=appbar-snippet-secondary><span>(KLSE:CCB)</span></div><div
> role="button" class="goog-inline-block jfk-button jfk-button-standard
> appbar-add" tabindex="0"
> action="/finance/portfolio?action=add&addticker=KLSE:CCB&ei=Jim2VrHAD8e40gSyzb2QBg">Add
> to portfolio</div></div></div></div><div class=elastic><div id=app
> class="g-section g-tpl-left-11p4em"><div class="g-unit g-first"><div
> id=gf-nav><div class=fjfe-nav-nav><ul class=fjfe-nav id=navmenu><li
> class="fjfe-nav-expanded fjfe-nav-selected">Company<li
> class=fjfe-nav-sub><a
> href="/finance?q=KLSE:CCB&ei=Jim2VrHAD8e40gSyzb2QBg
> <https://www.google.com/finance?q=KLSE:CCB&ei=Jim2VrHAD8e40gSyzb2QBg>">Summary</a><li
> class=fjfe-nav-sub><a
> href="/finance/company_news?q=KLSE:CCB&ei=Jim2VrHAD8e40gSyzb2QBg
> <https://www.google.com/finance/company_news?q=KLSE:CCB&ei=Jim2VrHAD8e40gSyzb2QBg>">News</a><li
> class=fjfe-nav-sub><div>Related companies</div><li class=fjfe-nav-sub><a
> href="/finance/historical?q=KLSE:CCB&ei=Jim2VrHAD8e40gSyzb2QBg
> <https://www.google.com/finance/historical?q=KLSE:CCB&ei=Jim2VrHAD8e40gSyzb2QBg>">Historical
> prices</a><li class=fjfe-nav-item><a
> href="/finance?ei=Jim2VrHAD8e40gSyzb2QBg
> <https://www.google.com/finance?ei=Jim2VrHAD8e40gSyzb2QBg>"><div>Markets</div></a><li
> class=fjfe-nav-item><a href="/finance/market_news?ei=Jim2VrHAD8e40gSyzb2QBg
> <https://www.google.com/finance/market_news?ei=Jim2VrHAD8e40gSyzb2QBg>"><div>News</div></a><li
> class=fjfe-nav-item><a
> href="/finance/portfolio?action=view&ei=Jim2VrHAD8e40gSyzb2QBg
> <https://www.google.com/finance/portfolio?action=view&ei=Jim2VrHAD8e40gSyzb2QBg>"><div>Portfolios</div></a><li
> class=fjfe-nav-item><a
> href="/finance/stockscreener?ei=Jim2VrHAD8e40gSyzb2QBg
> <https://www.google.com/finance/stockscreener?ei=Jim2VrHAD8e40gSyzb2QBg>"><div>Stock
> screener</div></a><li class=fjfe-nav-item><a
> href="/finance/domestic_trends?ei=Jim2VrHAD8e40gSyzb2QBg
> <https://www.google.com/finance/domestic_trends?ei=Jim2VrHAD8e40gSyzb2QBg>"><div>Google
> Domestic Trends</div></a></ul></div><div
> class="fjfe-recentquotes"><h4>Recent Quotes <span
> class="fjfe-recentquotes-duration">(<a
> href="//www.google.com/history?hl=en&authuser=0
> <https://www.google.com/history?hl=en&authuser=0>">180
> days</a>)</span></h4><div class=fjfe-recentquotes-noquote-notification>You
> have no recent quotes</div><div class=fjfe-recentquotes-quotes><div
> class="fjfe-toggle fjfe-toggle-button"><span
> class=fjfe-chg-toggle>chg</span> | <span
> class=fjfe-perc-toggle>%</span></div><div class=fjfe-table-div><table
> class=fjfe-recentquotes-table id=rq width=100%><tbody><tr><td class=symbol
> data-id="808011805219848"><a
> href="/finance?q=KLSE:PENTA&ei=Jim2VrHAD8e40gSyzb2QBg
> <https://www.google.com/finance?q=KLSE:PENTA&ei=Jim2VrHAD8e40gSyzb2QBg>"title="KLSE:PENTA">PENTA</a><td
> class=price><span id=ref_808011805219848_l>0.710</span><td class="change
> fjfe-toggle-button"><span class=fjfe-abs><span class=unchanged
> id=ref_808011805219848_c>0.00</span></span><span class=fjfe-perc><span
> class=unchanged id=ref_808011805219848_cp>0.00%</span></span><td
> class=del-btn><b class="del-btn-wrapper gf-table-delete"
> style="display:none"><img class="SP_delete button" alt="Remove PENTA from
> list" title="Remove PENTA from list"
> src="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="/></b><tbody><tr><td
> class=symbol data-id="311272313124927"><a
> href="/finance?q=KLSE:MAGNI&ei=Jim2VrHAD8e40gSyzb2QBg
> <https://www.google.com/finance?q=KLSE:MAGNI&ei=Jim2VrHAD8e40gSyzb2QBg>"title="KLSE:MAGNI">MAGNI</a><td
> class=price><span id=ref_311272313124927_l>4.21</span><td class="change
> fjfe-toggle-button"><span class=fjfe-abs><span class=up
> id=ref_311272313124927_c>+0.010</span></span><span class=fjfe-perc><span
> class=up id=ref_311272313124927_cp>0.24%</span></span><td class=del-btn><b
> class="del-btn-wrapper gf-table-delete" style="display:none"><img
> class="SP_delete button" alt="Remove MAGNI from list" title="Remove MAGNI
> from list"
> src="data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="/></b></table></div></div></div></div></div><div
> class=g-unit id=gf-viewc><div class=fjfe-content>*
>
> *What I entered was:*
> =RCHGetHTMLTable("https://www.google.com/finance/related?q=KLSE%3A
> "&TickerName&&quot;&ei=-3m0VqGeKo3fuASC3KrYDQ","KLSE:"&TickerName&"",-1,"",1)
>
> but it still returns nothing..
> -1 means find backwards
> *1 means one table only*
> *what am I getting wrong? this is so confusing @.@*
>
>
> *(sorry for the bold words, im not sure why everything became bold after i
> touch the bold button once, but tried to press it again to unbold but
> doesnt work T.T)*
>
>
>
>
>
>

Sat Feb 6, 2016 6:42 pm (PST) . Posted by:

perseuslim11

I see, thanks for the clarification ^^

so, as an alternative, is it possible to use rchgethtmltable for the
"competitors(penta)" table in this link?
http://quotes.wsj.com/MY/XKLS/PENTA http://quotes.wsj.com/MY/XKLS/PENTA



Sat Feb 6, 2016 7:28 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

One way I usually check is to go to the SMF-Quick-Webpage-Examination.xls
template. It has a worksheet for table extraction. Just fill in the web
page, leave the search strings empty, and increment the begin direction and
end direction from 1 on up, to see which tables show up.

On Sat, Feb 6, 2016 at 7:42 PM, perseuslim11@... wrote:

>
> I see, thanks for the clarification ^^
>
> so, as an alternative, is it possible to use rchgethtmltable for the
> "competitors(penta)" table in this link?
> http://quotes.wsj.com/MY/XKLS/PENTA
>
>
>

Sat Feb 6, 2016 10:40 pm (PST) . Posted by:

perseuslim11

wow! this is so magical ! I tried 1,1
and it showed up!
For the Add-in, Documentation, Templates, Tips and FAQs, visit http://ogres-crypt.com/SMF

Tidak ada komentar:

Posting Komentar