Jumat, 30 Agustus 2013

[smf_addin] Digest Number 2751

7 New Messages

Digest #2751

Messages

Thu Aug 29, 2013 12:22 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

The ">" and "<" are just SOMETIMES things that make strings unique. They
don't always work. It will ENTIRELY depend on how the web page is coded.
They would be the ending and starting delimiters of the HTML tags
surrounding the search terms. They can differentiate a search term from one
that is being used in a sentence. But not all web pages tuck them up
adjacent to the strings, either.

You DO need to look at the source code of the web page in some instances.
Especially when things aren't working.

The reason I didn't use ">Per Share Data<" is because the first place that
is located is, again, the hyperlink menu across the top of the page (just
to the left of where a ticker symbol can be entered). That's why it doesn't
work. Just because you see something on the web page doesn't make it the
FIRST place that string is used. In this case, even the ">" and/or "<"
tricks don't make it unique. It's also why it doesn't always make sense to
use simple words -- a META tag at the top of the page may describe it and
use those simple words, but you never see them unless you look at the
source code of the web page.

I simply used "except for per share" because it was a unique phrase on the
page that I could use.

On Thu, Aug 29, 2013 at 11:37 AM, ridgebacksexcel <tmallen2@bellsouth.net>wrote:

>
> Just so I understand this stuff better, how come you use the first PFind
> string as: "except per share" without the > and < surrounding it?
>
> I see that you want to start the initial search at the top of the table.
> Why not >Per Share Data< as the first PFind? It seems to not work however.
>
> I see you are pulling the last 3 words from the source code here I think:
>
> <font class="micro"> <img src="/images/question.png" alt="help";><a href="
> http://www.gurufocus.com/news.php?id=33474" class="gray"
> target="_blank">See this page for the explanation of the data and charts
> </a>
> * All numbers are in millions except for per share data </font>
>
> <table id="Rf" class="R10"
> style="clear:both;width:1000px;table-layout: fixed;"><tbody>;<tr><td
> class="call2" width="16%" nowrap>Per Share Data<a name="sh"
> id="sh"></a></td><td colspan="11" class="s22" width="61%">Annuals</td><td
> colspan="5" class="warn2" width="23%">Quarterly<;/td></tr><tr
> onClick="javascript:tablerowajaxpage('/modules/chart/stock/stock_iframe.php??symbol=GLW&series[]=per
> share rev&series[]=per share eps&series[]=Book Value Per Share&title=Per
> Share Data&trendline[]=1&showq=true&quarterlydata',&#39;Rf',this,'Fiscal
> Period1011054522&#39;);" onmouseover = "this.className='highlight
> highlightwithicon&#39;;" onMouseOut="this.className='';"><td class='tk&#39;
> title='Fiscal Period'><div style='width:200px;'>Fiscal Period</div></td>
>
>
> and then the table data starts.
>
> Interesting. Does it find those 3 exact works at the beginning of the
> source code I pasted?
>
> What is the difference with > < surrounding text or not surrounding it?
>
> Thanks. This should help me finish my project.
>

Thu Aug 29, 2013 2:20 pm (PDT) . Posted by:

"ridgebacksexcel" ridgebacksexcel

Thanks Randy. I learn new stuff every day, especially from you.

--- In smf_addin@yahoogroups.com, Randy Harmelink <rharmelink@...> wrote:
>
> The ">" and "<" are just SOMETIMES things that make strings unique. They
> don't always work. It will ENTIRELY depend on how the web page is coded.
> They would be the ending and starting delimiters of the HTML tags
> surrounding the search terms. They can differentiate a search term from one
> that is being used in a sentence. But not all web pages tuck them up
> adjacent to the strings, either.
>
> You DO need to look at the source code of the web page in some instances.
> Especially when things aren't working.
>
> The reason I didn't use ">Per Share Data<" is because the first place that
> is located is, again, the hyperlink menu across the top of the page (just
> to the left of where a ticker symbol can be entered). That's why it doesn't
> work. Just because you see something on the web page doesn't make it the
> FIRST place that string is used. In this case, even the ">" and/or "<"
> tricks don't make it unique. It's also why it doesn't always make sense to
> use simple words -- a META tag at the top of the page may describe it and
> use those simple words, but you never see them unless you look at the
> source code of the web page.
>
> I simply used "except for per share" because it was a unique phrase on the
> page that I could use.
>
> On Thu, Aug 29, 2013 at 11:37 AM, ridgebacksexcel <tmallen2@...>wrote:
>
> >
> > Just so I understand this stuff better, how come you use the first PFind
> > string as: "except per share" without the > and < surrounding it?
> >
> > I see that you want to start the initial search at the top of the table.
> > Why not >Per Share Data< as the first PFind? It seems to not work however.
> >
> > I see you are pulling the last 3 words from the source code here I think:
> >
> > <font class="micro"> <img src="/images/question.png" alt="help";><a href="
> > http://www.gurufocus.com/news.php?id=33474" class="gray"
> > target="_blank">See this page for the explanation of the data and charts
> > </a>
> > * All numbers are in millions except for per share data </font>
> >
> > <table id="Rf" class="R10"
> > style="clear:both;width:1000px;table-layout: fixed;"><tbody>;<tr><td
> > class="call2" width="16%" nowrap>Per Share Data<a name="sh"
> > id="sh"></a></td><td colspan="11" class="s22" width="61%">Annuals</td><td
> > colspan="5" class="warn2" width="23%">Quarterly<;/td></tr><tr
> > onClick="javascript:tablerowajaxpage('/modules/chart/stock/stock_iframe.php??symbol=GLW&series[]=per
> > share rev&series[]=per share eps&series[]=Book Value Per Share&title=Per
> > Share Data&trendline[]=1&showq=true&quarterlydata',&#39;Rf',this,'Fiscal
> > Period1011054522&#39;);" onmouseover = "this.className='highlight
> > highlightwithicon&#39;;" onMouseOut="this.className='';"><td class='tk&#39;
> > title='Fiscal Period'><div style='width:200px;'>Fiscal Period</div></td>
> >
> >
> > and then the table data starts.
> >
> > Interesting. Does it find those 3 exact works at the beginning of the
> > source code I pasted?
> >
> > What is the difference with > < surrounding text or not surrounding it?
> >
> > Thanks. This should help me finish my project.
> >
>

Thu Aug 29, 2013 2:43 pm (PDT) . Posted by:

"Kermit W. Prather" kermitpra

Randy, I found the documentation for smfWord but cannot figure out how to determine
if the webpage I retrieve is example #1 or example #2
I get the below information back for this =smfGetTagContent("http://getsplithistory.com/"&A1,"div",0,"splits-text";)
when A1 is IBM in example #1 and AGNC for example #2



I have to determine if the table exist or not.

Plus, I am not sure how to get the entire table into the worksheet so I can do the calculations.


From: smf_addin@yahoogroups.com [mailto:smf_addin@yahoogroups.com] On Behalf Of Kermit W. Prather
Sent: Thursday, August 29, 2013 1:35 PM
To: smf_addin@yahoogroups.com
Subject: RE: [smf_addin] Need help with this webpage


You totally lost me there. I am not familiar with the smfWord function. I looked thru the doc and can't find a any mention of it.
I'm not sure what else is needed to put it all together.

Where is smfWord documented?

I want to download the complete table and then calculate the shares because the number of rows varies from stock to stock. Some stocks have no splits (AGNC)
so there is not table.
Just a text message at top of page. I can retrieve with
=smfGetTagContent("http://getsplithistory.com/"&A1,"div",0,"splits-text";)
this returns
<b>International Business Machines Corp.</b> has had <b>7</b> splits.
Where the 7 tell me there has been 7 splits so there will be 7 rows in the table.
Some stock will have more Walmart has 9 splits.
So I need the table to be expandable.

My real problem is I can't figure out how to download the table.

From: smf_addin@yahoogroups.com [mailto:smf_addin@yahoogroups.com] On Behalf Of Randy Harmelink
Sent: Thursday, August 29, 2013 1:06 PM
To: smf_addin@yahoogroups.com
Subject: Re: [smf_addin] Need help with this webpage


Why not just compute it yourself, from the data in the table. For example, referring to the "Ratio" column:

=smfWord(D4,1,":") / smfWord(D4,2,":")

On Thu, Aug 29, 2013 at 10:00 AM, Kermit W. Prather <kermitp@tampabay.rr.com> wrote:
Well I'm not really sure. I need the Class= from each table row. In addition to grabbing the table.


Thu Aug 29, 2013 4:32 pm (PDT) . Posted by:

"osv_jaejun" osv_jaejun



This is for you if you are in need of financial data to import into your spreadsheet.

I am very grateful to Randy for his amazing add-in and I used it primarily for many years and built a lot of spreadsheets out of it.

But last year, websites started to change designs to become more dynamic and used less tables which meant data couldn't be pulled. I figured that sooner than later, scraping data was going to become difficult.

Seems like this situation is very close.

My name is Jae Jun and I run a website (oldschoolvalue.com) with a subscription to my own data feed for my stock analyzer product. It downloads and imports all the financial data along with valuation models and the works. You can use the SMF add-in along with the spreadsheet without any issues.

But here's the deal. Until I started paying for the data, I didn't realize how expensive it was.

With Randy's permission, if you are interested in accessing JUST the financial statements (downloads 10 annual statements and 5 quarterly numbers) without worrying about websites screwing up, then I can create a barebones version of my spreadsheet and offer it to SMF members ONLY. Think of it as a template.

There will be a subscription price associated with it.
Discounted of course because it was thanks to Randy for giving me the idea in the first place. Cost will likely be $20/month which is peanuts compared to the time and headache you will save yourself.

Below is a sample excel file of what I'm talking about. You get the full financial statements, just like you did with advfn before all these changes.

http://oldschoolvalue.s3.amazonaws.com/demo/SMF-Members-Only-Sample_Stock_Analyzer_Barebones.xls

If Randy doesn't like the idea of selling on his group, then I apologize and won't bring it up again. Just think that this will be a good long-term solution to the current problems.

If Randy is ok with it and there is enough people who are interested, then I will try to set up everything to make it happen.

Before I post any more details, I'll see what Randy and you all think.

--- In smf_addin@yahoogroups.com, "Kermit W. Prather" <kermitp@...> wrote:
>
> Folks, I think we have pretty well established that ADVFN site is not
> working.
>
> I don't think we need any more posting to tell us what we already know.
>
> Come to think of it, we probably don't need my posting either.
>
> Have a nice day, everyone
>
> Kermit
>
> -----Original Message-----
> From: smf_addin@yahoogroups.com [mailto:smf_addin@yahoogroups.com] On Behalf
> Of codyklein
> Sent: Wednesday, August 28, 2013 7:26 PM
> To: smf_addin@yahoogroups.com
> Subject: [smf_addin] Re: Advfn data not updating in smf_addin
>
> The new site is disappointing IMO. Heres a peek at FTR:
> http://www.advfn.com/common/financial/NASDAQ/frontier-communications-corp-mm
> -FTR/full-financials?pm=Q
>
>
> --- In smf_addin@yahoogroups.com, "codyklein&quot; <codyklein@> wrote:
> >
> > The ADVFN site isn't even working right if you try and go back to get
> annual data starting in 2003 or so it takes you to the wrong page, it kicks
> you back to the summary page.
> >
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>

Thu Aug 29, 2013 8:18 pm (PDT) . Posted by:

bmissell_thornhill


I just tried it at home (different computer) same results.
Running 2010 at home - Microsoft Office Professional Plus 2010 -
14.0.6029.1000




I get 3M CO links for both of the ones you asked me to test. Both
try to take me to MSN site (never loads - just spins).




Bill


--- In smf_addin@yahoogroups.com, <rharmelink@...> wrote:

Hmmm. Your results for the first and third functions look OK. Do
you have an older version of EXCEL?

What do you get for:

=TRIM(smfGetTagContent("http://investing.money.msn.com/investment&#92;
s/stock-report?CR=1&AF=1&IH=1&AIE=1&AIR=1&FRH=1&FRK=1&ISA=1&ISQ=1\
&BSA=1&BSQ=1&CFA=1&CFQ=1&TYS=1&ITT=1&ITP=1&Type=Equity&Symbol=MMM

<http://investing.money.msn.com/investments/stock-report?CR=1&AF=&#92;
1&IH=1&AIE=1&AIR=1&FRH=1&FRK=1&ISA=1&ISQ=1&BSA=1&BSQ=1&CFA=1&CFQ=\
1&TYS=1&ITT=1&ITP=1&Type=Equity&Symbol=MMM
> ","h1",0,"title="""))

=smfGetTagContent("http://investing.money.msn.com/investments/sto\
ck-report?CR=1&AF=1&IH=1&AIE=1&AIR=1&FRH=1&FRK=1&ISA=1&ISQ=1&BSA=\
1&BSQ=1&CFA=1&CFQ=1&TYS=1&ITT=1&ITP=1&Type=Equity&Symbol=MMM

<http://investing.money.msn.com/investments/stock-report?CR=1&AF=&#92;
1&IH=1&AIE=1&AIR=1&FRH=1&FRK=1&ISA=1&ISQ=1&BSA=1&BSQ=1&CFA=1&CFQ=\
1&TYS=1&ITT=1&ITP=1&Type=Equity&Symbol=MMM
> ","h1",0,"title=""")

On Thu, Aug 29, 2013 at 4:15 AM, <bmissell@...> wrote:

Interesting - did not know differnent processors would yield
different results!
=RCHGetElementNumber("Version&quot;) yeilds - "Stock Market
Functions add-in, Version 2.1.2012.12.29
(C:\Users&#92;bmissell&#92;AppData&#92;Roaming&#92;Microsoft&#92;AddIns; 1)"
=RCHGetElementNumber("MMM";,13862) - yields - "Error"
=smfGetAParms(13862) yields "MSN;Company
Name;=TRIM(smfStrExtr("|"&smfGetTagContent("http://investing.mone\
y.msn.com/investments/stock-report

<http://investing.money.msn.com/investments/stock-report> ?-
CR=1&AF=1&IH=1&AIE=1&AIR=1&FRH=1&FRK=1&ISA=1&ISQ=1&BSA=1&BSQ=1&CF\
A=1&CFQ=1&TYS=1&ITT=1&ITP=1&Type=Equity&Symbol=~~~~~","div",-1,"c\
lass=""cn""")&"<","|","<"))"

Bill

Thu Aug 29, 2013 8:28 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

They should NOT create links. The probably means something isn't getting
cut and pasted correctly.

On Thu, Aug 29, 2013 at 8:18 PM, <bmissell@comcast.net> wrote:

>
> I just tried it at home (different computer) same results. Running 2010 at
> home - Microsoft Office Professional Plus 2010 - 14.0.6029.1000
>
> I get 3M CO links for both of the ones you asked me to test. Both try to
> take me to MSN site (never loads - just spins).
>
> Bill
>
> --- In smf_addin@yahoogroups.com, <rharmelink@...> wrote:
>
> Hmmm. Your results for the first and third functions look OK. Do you have
> an older version of EXCEL?
>
> What do you get for:
>
> =TRIM(smfGetTagContent("
> http://investing.money.msn.com/investments/stock-report?CR=1&AF=1&IH=1&AIE=1&AIR=1&FRH=1&FRK=1&ISA=1&ISQ=1&BSA=1&BSQ=1&CFA=1&CFQ=1&TYS=1&ITT=1&ITP=1&Type=Equity&Symbol=MMM
> ","h1",0,"title="""))
>
> =smfGetTagContent("
> http://investing.money.msn.com/investments/stock-report?CR=1&AF=1&IH=1&AIE=1&AIR=1&FRH=1&FRK=1&ISA=1&ISQ=1&BSA=1&BSQ=1&CFA=1&CFQ=1&TYS=1&ITT=1&ITP=1&Type=Equity&Symbol=MMM
> ","h1",0,"title=""")
>

Thu Aug 29, 2013 8:30 pm (PDT) . Posted by:

"Randy Harmelink" rharmelink

I just cut and pasted what I see on the website, using my browser. Both
formulas worked fine. No links created.

On Thu, Aug 29, 2013 at 8:28 PM, Randy Harmelink <rharmelink@gmail.com>wrote:

> They should NOT create links. The probably means something isn't getting
> cut and pasted correctly.
>

Tidak ada komentar:

Posting Komentar