Minggu, 29 Januari 2017

[smf_addin] Digest Number 3903

5 Messages

Digest #3903
1a
Better way to get this data? by "Omar Jaleel" saanajaleel
1b
Re: Better way to get this data? by "Randy Harmelink" rharmelink
2a
Re: Last and Next Earnings Report Date by "Randy Harmelink" rharmelink

Messages

Sat Jan 28, 2017 7:39 pm (PST) . Posted by:

"Omar Jaleel" saanajaleel

Randy:

I was wondering if there was a better way to get the company description
from reuters. Here is the formula that I have been using the only issue is
I can't figure a way to get rid of the multiple >>p<< in the middle of the
description.

=smfStrExtr(smfGetTagContent("
http://www.reuters.com/finance/stocks/companyProfile?symbol="&Ticker,"div",1,"Full
Description"),"<p>","</p><div")

Thanks for the help and I'm glad that you are back home.

--

Sun Jan 29, 2017 12:28 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

Try something like:

=SUBSTITUTE(SUBSTITUTE(smfStrExtr(smfGetTagContent("
http://www.reuters.com/finance/stocks/companyProfile?symbol="&$B$6,"div",1,"Full
Description"),"<p>","</p><div"),"</p>",""),"<p>",CHAR(10))

It will put in the text breaks the HTML would normally show.

On Sat, Jan 28, 2017 at 8:39 PM, Omar Jaleel omar.jaleel@
​...wrote:

>
> I was wondering if there was a better way to get the company description
> from reuters. Here is the formula that I have been using the only issue is
> I can't figure a way to get rid of the multiple >>p<< in the middle of the
> description.
>
> =smfStrExtr(smfGetTagContent("http://www.reuters.com/
> finance/stocks/companyProfile?symbol="&Ticker,"div",1,"Full
> Description"),"<p>","</p><div")
>
>

Sun Jan 29, 2017 12:15 pm (PST) . Posted by:

"Randy Harmelink" rharmelink

It appears the stocks have different phrasing depending on the stock. For
example:

=smfStrExtr(SUBSTITUTE(RCHGetWebData("
https://www.earningswhispers.com/stocks/"&$A14,"twitter.com",300),"%20","
")," on "," via ")

...to get to the date:

AAPL 1/31/2017 AMC. The Earnings Whisper number is $3.23
AGU Thursday, February 09, 2017 at 5:30 PM ET
AMGN 2/2/2017 AMC. The Earnings Whisper number is $2.82
AMZN 2/2/2017 AMC. The Earnings Whisper number is $1.44
APA Thursday, February 23, 2017 at 8:00 AM ET
MMM Tuesday, April 25, 2017 at 7:30 AM ET
So, one format for an exact time, and another for a general time. There may
even be others? You could have two (or more?) extractions, then use the one
that works.

On Sat, Jan 28, 2017 at 7:46 PM, lutherkinchen@
​...wrote:

>
> Hey all, I've using the updated formulas Doug provided to retrieve
> earnings dates and times.
> Some symbols will pull in earnings dates when I open the worksheet and
> others do not.
> Below is a look at the first 5 lines of my spreadsheet and you'll see 3 of
> the 5 symbols do not pull in earnings dates. Does this happen to any of
> you. (the spreadsheet has over 100 symbol and 75% do pull in correctly.)
>
> The formulas used for earnings date are (ie. A7 has the symbol AAPL)
> =smfStrExtr(SUBSTITUTE(RCHGetWebData("https://www.
> earningswhispers.com/stocks/"&$A7,"og:description",100),"%20","
> "),"earnings on ",". Shares")
>
> The formula for the time earnings announce pre/post session are (ie. A7
> has symbol AAPL)
> =SUBSTITUTE(smfStrExtr(SUBSTITUTE(RCHGetWebData("http
> s://www.earningswhispers.com/stocks/"&$A7,"twitter.com",150),"%20"," "),"
> at "," via")," ET","")
>
> Here's a look at the first 5 stocks in the worksheet I review each weekend.
> It pulls in earnings dates for AGU & APA, but will not pull them in for
> AAPL, AMGN and AMZN.
> Seems odd that 75% of the symbols will pull in the earnings dates but not
> the other 25%.
> Any ideas on what I could do to pull in 100%.
> thanks
> Luther
>
> *Sym* *Price* *LT* *ST* *PA* *NT* *Earnings* *Dys* *AM/PM*
> AAPL 121.95 u <https://www.earningswhispers.com/stocks>
> Unknown
> AGU 104.29 x 2/9/2017
> <https://www.earningswhispers.com/stocks> 12 5:30 PM
> AMGN 157.16 x <https://www.earningswhispers.com/stocks>
> Unknown
> AMZN 835.77 u <https://www.earningswhispers.com/stocks>
> Unknown
> APA 62.08 d 2/23/2017
> <https://www.earningswhispers.com/stocks> 26 8:00 AM
>
>
>
>
>
>
>
>
>
>
>

Sun Jan 29, 2017 1:42 pm (PST) . Posted by:

jhfrazer@ymail.com

That gives me an interesting result. I get the chart, which is awesome, but it is permanent as opposed to a popup. And the only way to make the chart go away is to "undo" the cell contents.

My other question is the meaning and purpose of the "r=" value. Stockcharts did not give me that in theemail link? And when i inspect the element using firefox i come up with..

<img class="chartimg buttons-present&quot; id="chartImg&quot; src="/c-sc/sc?s=AAPL&;p=D&yr=3&mn=0&dy=0&i=p78116736167&amp;r=1485725768284">

Am i totally on the WRONG TRACK. Which would be very disappointing as I am really trying to learn more about web scraping in excel. I have been reading what I can, I even bought a book/booklet on web scraping in excel on amazon but it was not as enlightening as i had hoped. Guidance would be GREATLY appreciated.

Thanks

Sun Jan 29, 2017 3:10 pm (PST) . Posted by:

jhfrazer@ymail.com

It looks like the last digit of the function you provided, the "1" tells the chart to be permanent. Is that correct? It seems to have cleared up the issue. As to positioning, the "top" and "left" variables in the function. if I understand correctly an entry on 100 for "top" should shift the top of the chart up to 100 pixels above the top of the cell. Is that correct? If so I wonder why that is not working for me? any thoughts?
For the Add-in, Documentation, Templates, Tips and FAQs, visit http://ogres-crypt.com/SMF

Tidak ada komentar:

Posting Komentar