Re: [GNC] GNC] Finance-Quote 1.60 released!

2024-04-18 Thread Kalpesh Patel
I was able to reproduce the issue in Frankfurt so it definitely is "geo" based 
issue; specifically EU countries. Attached is a drop in replacement 
YahooJSON.pm module that works with EU and other regions if anyone wants to use 
it before new package is released that incorporates these changes.


-Original Message-
From: Bruce Schuck  
Sent: Thursday, April 18, 2024 1:31 PM
To: gnucash-user@gnucash.org
Cc: kalpesh.pa...@usa.net
Subject: Re: GNC] Finance-Quote 1.60 released!

On Thu, 18 Apr 2024 16:13:34 +0200, Klaus writes:

> I am located in Germany and only one cookie is returned. Here is the 
> top of the output of 'curl --include https://login.yahoo.com':

Klaus,

Thank you for posting that. It helps confirm this is a geo related issue.

Thank you to David Crowe for pointing out 
https://developer.yahooinc.com/datax/guide/gdpr/cookiemapping/ on 
https://github.com/finance-quote/finance-quote/issues/373. I suspect GDPR 
compliance is related to the YahooJSON issue.

Additional testing did indicate that the module does work from an Albanian IP 
address. I guess while this is being researched, users with EU IP addresses can 
not use the 'yahoo_json' quote method.

I believe Kalpesh is going to stand up an AWS EC2 instance in an EU region for 
further investigation. Very much appreciated.

Bruce S


YahooJSON.pm
Description: Binary data
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.60 released!

2024-04-18 Thread Richard Ullger via gnucash-user
On Wed, 17 Apr 2024 12:39:51 -0700
"Bruce Schuck"  wrote:

> "AS=v=1=..." cookie.
> 
> ### [Wed Apr 17 08:59:30 2024]cookie_jar : bless( {
> ### COOKIES => {
> ### 'login.yahoo.com' => {
> ### '/' => {
> ### AS => [
> ### 0,
> ###
> 'v=1=pdMraThU=A6620c4d1|itU7Kpb.2SoujXrNK8pQPMi...
> ### undef,
> ### 1,
> ### 1,
> ### undef,
> ### 1,
> ### {
> ### HttpOnly => undef
> ### }
> ### ]
> ### }
> ### }
> ### }
> ### }, 'HTTP::Cookies' )
> 
> The other 3 cookies that I get can see in debug mode are not in the
> cookie jar. My theory is that for those it is not working, they are
> not getting all 4 cookies.
> 

Sorry for the delayed response. I had to build packages for missing
dependencie
s required by stockdump.pl.

I'm in the UK and confirm output from stockdump.pl shows only the AS
cookie.

Output from

curl --include
https://login.yahoo.com/?.lang=en-US=finance&.done=https%3A%2F%2Ffinance.yahoo.com%2F=118332=ybar-signin

from the UK gives the same result.

--
Richard



signature.asc
Description: OpenPGP digital signature
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.60 released!

2024-04-18 Thread Adam Griffis
Just to touch base again... I'm also located in Germany, and can
confirm that when I connect to my US-based VPN price retrieval works.

Thanks,
Adam

On Thu, Apr 18, 2024 at 4:19 PM Bruce Schuck  wrote:
>
> On 4/18/24 06:55, Kalpesh Patel wrote:
>
> > Any ways it definitely appears to be tied to geo location. Another
> > gentleman out of Germany is NOT getting those cookies either.
>
> Confirmed by the user in Spain I have been working with off-list. 
> The same user receives the necessary cookies when using a VPN that gives
> him a US based IP address. Over that VPN, F::Q and GnuCash return valid
> price data.
>
> > I'll see if I can spin up EC2 in different regions to build the trend
> > and then propose changes to the module that could accommodate both
> > sides. I need to confirm if subtle changes to the URI is also geo
> > based or not to make it logic work better.
>
> I also had the gentleman in Spain try
> "https://login.yahoo.com/config/login; with the same results.
>
> Waiting to see if
> "https://login.yahoo.com/?.lang=en-US=finance&.done=https%3A%2F%2Ffinance.yahoo.com%2F=118332=ybar-signin;
> from his location yields a different result.
>
> Thanks again.
>
> Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] GNC] Finance-Quote 1.60 released!

2024-04-18 Thread Bruce Schuck

On Thu, 18 Apr 2024 16:13:34 +0200, Klaus writes:


I am located in Germany and only one cookie is returned. Here is the
top of the output of 'curl --include https://login.yahoo.com':


Klaus,

Thank you for posting that. It helps confirm this is a geo related issue.

Thank you to David Crowe for pointing out 
https://developer.yahooinc.com/datax/guide/gdpr/cookiemapping/ on 
https://github.com/finance-quote/finance-quote/issues/373. I suspect 
GDPR compliance is related to the YahooJSON issue.


Additional testing did indicate that the module does work from an 
Albanian IP address. I guess while this is being researched, users with 
EU IP addresses can not use the 'yahoo_json' quote method.


I believe Kalpesh is going to stand up an AWS EC2 instance in an EU 
region for further investigation. Very much appreciated.


Bruce S

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.60 released!

2024-04-18 Thread Bruce Schuck

On 4/18/24 06:55, Kalpesh Patel wrote:


Any ways it definitely appears to be tied to geo location. Another
gentleman out of Germany is NOT getting those cookies either.


Confirmed by the user in Spain I have been working with off-list.  
The same user receives the necessary cookies when using a VPN that gives 
him a US based IP address. Over that VPN, F::Q and GnuCash return valid 
price data.



I'll see if I can spin up EC2 in different regions to build the trend
and then propose changes to the module that could accommodate both
sides. I need to confirm if subtle changes to the URI is also geo
based or not to make it logic work better.


I also had the gentleman in Spain try 
"https://login.yahoo.com/config/login; with the same results.


Waiting to see if 
"https://login.yahoo.com/?.lang=en-US=finance&.done=https%3A%2F%2Ffinance.yahoo.com%2F=118332=ybar-signin; 
from his location yields a different result.


Thanks again.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.60 released!

2024-04-18 Thread Klaus Dahlke via gnucash-user
Hi Bruce,
I am located in Germany and only one cookie is returned. Here is the top of the 
output of 'curl --include https://login.yahoo.com':

HTTP/2 200 ^M
referrer-policy: strict-origin-when-cross-origin^M
strict-transport-security: max-age=15552000^M
x-content-type-options: nosniff^M
x-frame-options: DENY^M
x-xss-protection: 1; mode=block^M
age: 0^M
pragma: no-cache^M
expires: 0^M
cache-control: no-cache, no-store, must-revalidate^M
set-cookie: 
AS=v=1=r6PBcqr2=A662274a0|YhvsrWj.2SqTtg_jxRaQvFK8zNTY44tUymYimPg6c9gCwgwhAsCvkscuGtviYS3lDhYSg0DIjR0FtgAahgdU0dycIjClrbS7quY3c0x51rbOvOWuqMWDSt_w3QNqsQMvErv.X3N.5A45vjSWT4FBYyAUtphASWz1tyQlcnj7m7s_xddhIDU1XV9fnv..kIZ6U0Ypmneev8KfHoBjroh0ijcggaaf7s1imDeUbl0dWCCh34Bwuo75RkhnzXsQZx3T0FUsY8biAdAfuUxaENW6BcACSWD7roR6Jl9stOUnCQrhgvtvSn1_p6gjNWFBwcU0WLS3h0kIcEEUxi2ELryZtz1ctoqMaJ_cgH8MlXmuS.POGnZLqJOWjaAA7Z2Lf92chAsN5wZwtl7dF4KAbM5VmfEkVFCRC8_NKvwJehQ40eiZsDSRofUViNg_bNFcFmVrAaik1HkpI.1awx_AinCac7heQ48OEztcroCWItDPKlKddxppKRKfr44zhrNrAL5ftcCsdgcbEPHHDA1fJxplLDCY.RRbRSVpdkAfrCZfazTxPWVJ_Az3RAbThwAqAVLwssV0ZEpeO0hM8yU9kmiLbZUUxa22jgTKBJLhrkyeeV6jqM5IR_xXGndAENVs.fLjNXuX5ZXhF7oGStEVVp_2GFteyn5TJzHCL2TgHVjd_nK3EO0fuZfo8bWVgqudW_MNuQlwADDE7GggAxoNdzD9MC4IAUl.8bZwokYjEKQuspXfyu3Kp8E-~A;
 path=/; domain=login.yahoo.com; secure; HttpOnly^M
content-type: text/html; charset=utf-8^M
content-length: 37389^M


Best regards
Klaus

On Wed, 17 Apr 2024 14:09:37 -0700
Bruce Schuck  wrote:

...
>
> The user having an issue is in Europe, I believe Spain. Maybe this is a
> geo based issue? Just guessing.
>

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.60 released!

2024-04-18 Thread Kalpesh Patel
Bruce -- Sorry, saving cookies part wasn't for you.

Any ways it definitely appears to be tied to geo location. Another gentleman 
out of Germany is NOT getting those cookies either.

I'll see if I can spin up EC2 in different regions to build the trend and then 
propose changes to the module that could accommodate both sides. I need to 
confirm if subtle changes to the URI is also geo based or not to make it logic 
work better.

-Original Message-
From: Bruce Schuck  
Sent: Wednesday, April 17, 2024 3:40 PM
To: 'GnuCash User' 
Cc: rull...@protonmail.com; adam.grif...@gmail.com; Kalpesh Patel 

Subject: Re: [GNC] Finance-Quote 1.60 released!

On 4/17/24 11:57 AM, Kalpesh Patel wrote:

> You can also save cookies to a file named cookies.txt as follows: 
> #curl -c cookies.txt https://login.yahoo.com -I

> and then following to display 11 characters crumb by using cookies 
> saved in previous command: #curl -H "user-agent: Mozilla/5.0 
> (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like
> Gecko) Chrome/39.0.2171.95 Safari/537.3" -b cookies.txt 
> https://query2.finance.yahoo.com/v1/test/getcrumb

I'm not interested in saving the cookies at this time. I've been having a 
discussion with another user having the same (or similar) issue. In debug mode 
his cookie jar has only 1 cookie, the "AS=v=1=..." cookie.

### [Wed Apr 17 08:59:30 2024]cookie_jar : bless( {
### COOKIES => {
### 'login.yahoo.com' => {
### '/' => {
### AS => [
### 0,
###
'v=1=pdMraThU=A6620c4d1|itU7Kpb.2SoujXrNK8pQPMi...
### undef,
### 1,
### 1,
### undef,
### 1,
### {
### HttpOnly => undef
### }
### ]
### }
### }
### }
### }, 'HTTP::Cookies' )

The other 3 cookies that I get can see in debug mode are not in the cookie jar. 
My theory is that for those it is not working, they are not getting all 4 
cookies.

Bruce S


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.60 released!

2024-04-17 Thread john



> On Apr 17, 2024, at 20:25, David G. Pickett via gnucash-user 
>  wrote:
> 
> Will there be a flatpak release?  No hurry, as yahoo fetching is still off 
> the rails.  So many web pages one can scrape the price off of!

Not on flat hub, but the nightly builds at 
https://code.gnucash.org/builds/flatpak/stable have 1.60 starting today.

Regards,
John Ralls



___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.60 released!

2024-04-17 Thread David G. Pickett via gnucash-user
Will there be a flatpak release?  No hurry, as yahoo fetching is still off the 
rails.  So many web pages one can scrape the price off of!
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.60 released!

2024-04-17 Thread Bruce Schuck

On 4/17/24 11:57 AM, Kalpesh Patel wrote:

You can also save cookies to a file named cookies.txt as follows: 
#curl -c cookies.txt https://login.yahoo.com -I


Some info: The user having issues with YahooJSON that I've been having a 
discussion with tried the simple curl command. Just *one* cookie is 
returned from https://login.yahoo.com/. I've tried it on 5 different 
systems in 3 different places (work, home, a FreeBSD server in NYC I 
have access to) and curl returns 4 cookies.


The user having an issue is in Europe, I believe Spain. Maybe this is a 
geo based issue? Just guessing.


On a side note about the "-I/--head" option to curl. It doesn't happen 
often but some websites disallow the HEAD fetch method. Which is why I 
default to using "-i/--include".


On a better note (I won't say good), I have identified how to get the 
YahooWeb and Fool modules to work. Notes are added to the issues 
(https://github.com/finance-quote/finance-quote/issues/379 and 
https://github.com/finance-quote/finance-quote/issues/377) if someone 
wants to work on pull requests to address those before I get a chance to.


Thank you.

Bruce S
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.60 released!

2024-04-17 Thread Bruce Schuck

On 4/17/24 11:57 AM, Kalpesh Patel wrote:

You can also save cookies to a file named cookies.txt as follows: 
#curl -c cookies.txt https://login.yahoo.com -I



and then following to display 11 characters crumb by using cookies
saved in previous command: #curl -H "user-agent: Mozilla/5.0
(Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/39.0.2171.95 Safari/537.3" -b cookies.txt
https://query2.finance.yahoo.com/v1/test/getcrumb


I'm not interested in saving the cookies at this time. I've been having 
a discussion with another user having the same (or similar) issue. In 
debug mode his cookie jar has only 1 cookie, the "AS=v=1=..." cookie.


### [Wed Apr 17 08:59:30 2024]cookie_jar : bless( {
### COOKIES => {
### 'login.yahoo.com' => {
### '/' => {
### AS => [
### 0,
### 
'v=1=pdMraThU=A6620c4d1|itU7Kpb.2SoujXrNK8pQPMi...

### undef,
### 1,
### 1,
### undef,
### 1,
### {
### HttpOnly => undef
### }
### ]
### }
### }
### }
### }, 'HTTP::Cookies' )

The other 3 cookies that I get can see in debug mode are not in the 
cookie jar. My theory is that for those it is not working, they are not 
getting all 4 cookies.


Bruce S
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.60 released!

2024-04-17 Thread Kalpesh Patel
   
undef,
### 
{
### 
  HttpOnly => undef,
### 
  SameSite => 'None'
### 
}
### 
  ]
### 
  }
### 
 },
###  
'login.yahoo.com' => {
### 
'/' => {
### 
 AS => [
### 
 0,
### 
 
'v=1=ZpPpXAWp=A662166f6|wy8UEd7.2SrgMZFNCyRJFuJ88rkOfc7f2KNA89u_WuZ6fXrY8xzJ07zjmdHjjnVL7tUTSw9uOSzz31wvEds3TZq7h7j7PYLUObzbyEjzTF2bq9g.9kTJ2emMatlgJP1V5BfRD7rzwA6LUYRRf3NJ2o4nE8UA9THS9pfojIhzfHE.zV82j.SFjuZaLiyo1qU7JOYKwW5rSnnrKLYDx_5LOF3xDsgPPsgB97CPalhkcGNN0Sfewon4rGTiq1xRAFC_P7moFihb9KK5ejN6TlswyksxWcImt6DpMaWxzQImS9rS4v_iM_IcHfyWSt4k6CankWWAtD0dCdmEuq5BJ8SRDpDwwjyWAPV8arKd8r9JVaDS1ODV.13EknVzp3Wi8WTpRiQYTeYhzBy0IpwYgEdFnEmFBkOXRfykYsYcQ60Dg1rUQZhWg8SJVk.ch9FNELrRVHCBaHJ6CK5d2BZPWKpFLz7NHK0POU5_rrRYjLhveOX7ISsG6GJxBSNCFuff4Aas0BbFL3mVc2X8hCzveGWCtO5TuXTkPrzJtHAVVzgQFrjQVsAVKycNM6I0lfvHNb23em30BKc7Kvc86pUxfXRBZi68mBBsCrm2isD6O9tKLgl7FovOZX4YtQAX2rNY6n.4Gen1pY5gTRCfU5iL.4gCjjmGt6Vvgtjlsvo0tXBSTUPmZvGwx97JON.atz7LDy9O2qALAskB04PnUhUXaH5thOOHFPYF92AB2w7f4j3IZMwHD.UFuWZc7EsaRG_5989fHZ9FtPyH94Ut6vqlInUkL_xXQuwmODh2RyYuCAoJCTwD~A',
### 
 undef,
### 
 1,
### 
 1,
### 
 undef,
### 
 1,
### 
 {
### 
   HttpOnly => undef
### 
 }
### 
   ]
### 
   }
### 
  }
###}
###   }, 'HTTP::Cookies' )
### [Wed Apr 17 14:31:18 2024] crumb : '8CJLZDzzDDN'


-Original Message-
From: Bruce Schuck  
Sent: Wednesday, April 17, 2024 1:50 PM
To: GnuCash User 
Cc: kalpesh.pa...@usa.net; rull...@protonmail.com; adam.grif...@gmail.com
Subject: Re: [GNC] Finance-Quote 1.60 released!

Wed Apr 17 11:58:37 EDT 2024, Kalpesh Patel writes:

> Is this happening on Windows 10 with Strawberry perl?

> There is one other user is having problem getting secure cookies on 
> Windows 10 which is what this appears to be as well. It is related to
> some Perl's SSL package being broken or not installed correctly but
> haven't been able to pinpoint it.

Wednesday, April 17, 2024 5:44 AM, Richard Ullger writes:

> yahoojson and yahooweb are not working for me either in v1.60 and 
> they didn't work in 1.59_01.
WRT "yahooweb", Yahoo made changes to their finance pages. The URL used 
for the web scrape, aside from some formatting changes that break the 
module, also returns a huge amount of header information (over 16k bytes 
when I fetch it using curl). While I have a fix for the large amount of 
header information, work needs to be done to change the parsing to 
retrieve the data (see 
https://github.com/finance-quote/finance-quote/issues/377).

WRT "yahoo_json" (which now allows it to be called "yahoojson"), some 
users are reporting the same. Turning debug on within Perl has so far 
indicated that not all the required cookies are being returned.

 From using "curl" the following cookies should be retrieved:

AS=v=...

A1=d=..

Re: [GNC] Finance-Quote 1.60 released!

2024-04-17 Thread Richard Ullger via gnucash-user
On Wed, 17 Apr 2024 11:58:37 -0400
"Kalpesh Patel"  wrote:

> Richard,
> 
> Is this happening on Windows 10 with Strawberry perl?
> 
> There is one other user is having problem getting secure cookies on
> Windows 10 which is what this appears to be as well. It is related to
> some Perl's SSL package being broken or not installed correctly but
> haven't been able to pinpoint it.

Hi Kalpesh,

I'm running Arch Linux with perl 5.38.2.

--
Richard


signature.asc
Description: OpenPGP digital signature
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.60 released!

2024-04-17 Thread Bruce Schuck

Wed Apr 17 11:58:37 EDT 2024, Kalpesh Patel writes:


Is this happening on Windows 10 with Strawberry perl?


There is one other user is having problem getting secure cookies on 
Windows 10 which is what this appears to be as well. It is related to

some Perl's SSL package being broken or not installed correctly but
haven't been able to pinpoint it.


Wednesday, April 17, 2024 5:44 AM, Richard Ullger writes:

yahoojson and yahooweb are not working for me either in v1.60 and 
they didn't work in 1.59_01.
WRT "yahooweb", Yahoo made changes to their finance pages. The URL used 
for the web scrape, aside from some formatting changes that break the 
module, also returns a huge amount of header information (over 16k bytes 
when I fetch it using curl). While I have a fix for the large amount of 
header information, work needs to be done to change the parsing to 
retrieve the data (see 
https://github.com/finance-quote/finance-quote/issues/377).


WRT "yahoo_json" (which now allows it to be called "yahoojson"), some 
users are reporting the same. Turning debug on within Perl has so far 
indicated that not all the required cookies are being returned.


From using "curl" the following cookies should be retrieved:

AS=v=...

A1=d=...

A3=d=...

A1S=d=...

From one user, it looks like only the "AS=v=..." cookie is returned.

Those having the same issue as Richard, please execute "curl --head 
https://login.yahoo.com; or "curl --include https://login.yahoo.com; and 
look for the "set-cookie:" lines in the header.


Here is a way to test outside of GnuCash on Linux and Mac. Utilizes 
cached package source left behind from install using "cpan".


# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 22.04.4 LTS
Release:22.04
Codename:   jammy

# If you have installed 1.60 more than once (perhaps different
# library paths), 1.60-0 may be 1.60-1 or 1.60-2, or ...
cd $HOME/.cpan/build/Finance-Quote-1.60-0
export PERL5LIB=$HOME/.cpan/build/Finance-Quote-1.60-0/lib:$PERL5LIB
./Examples/stockdump.pl yahoo_json AAPL
$VAR1 = {
  'AAPLlow' => '168.27',
  'AAPLopen' => '171.71',
  'AAPLsymbol' => 'AAPL',
  'AAPLeps' => '6.42',
  'AAPLvolume' => 58572152,
  'AAPLisodate' => '2024-04-16',
  'AAPLname' => 'AAPL (Apple Inc.)',
  'AAPLdiv_yield' => '0.5501187',
  'AAPLcurrency' => 'USD',
  'AAPLdate' => '04/16/2024',
  'AAPLhigh' => '173.755',
  'AAPLtype' => 'EQUITY',
  'AAPLpe' => '26.457943',
  'AAPLlast' => '169.86',
  'AAPLyear_range' => '   162.8 - 199.62',
  'AAPLexchange' => 'NasdaqGS',
  'AAPLsuccess' => 1,
  'AAPLclose' => '172.69',
  'AAPLmethod' => 'yahoo_json'
};

You can output debugging information by adding "DEBUG=1" before 
executing the stockdump.pl script.


$ DEBUG=1 ./Examples/stockdump.pl yahoo_json AAPL

For those still having an issue with v1.60, my guess is that you will 
find the "AS=" cookie in the debug output.


As Kalpesh theorized, the issue could lie within another Perl 
module/package.


On Wed, 17 Apr 2024 08:23:38 +0200, Adam Griffis writes:

> However, YahooJSON is still giving me the same error. Is an API key
> required for YahooJSON now?

No, Yahoo is not requiring an API Key.

Bruce S
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.60 released!

2024-04-17 Thread Kalpesh Patel
Richard,

Is this happening on Windows 10 with Strawberry perl? 

There is one other user is having problem getting secure cookies on Windows 10 
which is what this appears to be as well. It is related to some Perl's SSL 
package being broken or not installed correctly but haven't been able to 
pinpoint it.  

-Original Message-
From: Richard Ullger  
Sent: Wednesday, April 17, 2024 5:44 AM
To: gnucash-user@gnucash.org
Subject: Re: [GNC] Finance-Quote 1.60 released!

On Wed, 17 Apr 2024 08:23:38 +0200
"Adam Griffis"  wrote:

> Yes, I have the AlphaVantage api key set. But that's not the issue --
> I'm not pulling from AlphaVantage. I'm pulling from YahooJSON.
> 
> If I understand correctly, the 1.60 update should include a fix to get
> YahooJSON working again, resolving the "cookie and crumb" issue.
> However, YahooJSON is still giving me the same error. Is an API key
> required for YahooJSON now?
> 
> Thanks,
> Adam

yahoojson and yahooweb are not working for me either in v1.60 and they
didn't work in 1.59_01.

I have perl-http-cookiejar installed.

perl-finance-quote has been dropped from the arch repos to the AUR.
It's still at 1.59 in the AUR so I've taken the PKGBUILD and modified
it for 1.60.

I am currently running gnucash v4.14.

The output for yahoojson is...

gnc-fq-dump -v yahoojson AEI.L
Finance::Quote fields Gnucash uses:
symbol: AEI.L<=== required
  date: **
 missing **<=== recommended
  currency: ** missing **<=== required
  last: **missing**  <=\
   nav: **missing**  <=== one of these
 price: **missing**  <=/
  timezone:  <=== optional

** This stock quote cannot be used by GnuCash!


All fields returned by Finance::Quote for stock AEI.L

stock   field  value
-   -  -
AEI.Lerrormsg: Error retrieving quote for AEI.L. Attempt to
fetch the URL
https://query2.finance.yahoo.com/v11/finance/quoteSummary/?symbols=AEI.L={"finance":{"result":null,"error":{"code":"Unauthorized","description":"Invalid
Cookie"}}}=price,summaryDetail,defaultKeyStatistics resulted in
HTTP response 401 (Unauthorized)
AEI.Llast: **missing**
AEI.L nav: **missing**
AEI.L   price: **missing**
AEI.L success: 0
AEI.L  symbol: AEI.L


The output for yahooweb is...

gnc-fq-dump -v y
ahooweb AEI.L
Finance::Quote fields Gnucash uses:
symbol: AEI.L (deduced)  <=== required
  date: ** missing **<=== recommended
  currency: ** missing **<=== required
  last: **missing**  <=\
   nav: **missing**  <=== one of these
 price: **missing**  <=/
  timezone:  <=== optional

** This stock quote cannot be used by GnuCash!


All fields returned by Finance::Quote for stock AEI.L

stock   field  value
-   -  -
AEI.Lerrormsg: 500 Header line too long (limit is 8192)
AEI.Llast: **missing**
AEI.L nav: **missing**
AEI.L   price: **missing**
AEI.L success: 0

--
Richard

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.60 released!

2024-04-17 Thread Richard Ullger via gnucash-user
On Wed, 17 Apr 2024 08:23:38 +0200
"Adam Griffis"  wrote:

> Yes, I have the AlphaVantage api key set. But that's not the issue --
> I'm not pulling from AlphaVantage. I'm pulling from YahooJSON.
> 
> If I understand correctly, the 1.60 update should include a fix to get
> YahooJSON working again, resolving the "cookie and crumb" issue.
> However, YahooJSON is still giving me the same error. Is an API key
> required for YahooJSON now?
> 
> Thanks,
> Adam

yahoojson and yahooweb are not working for me either in v1.60 and they
didn't work in 1.59_01.

I have perl-http-cookiejar installed.

perl-finance-quote has been dropped from the arch repos to the AUR.
It's still at 1.59 in the AUR so I've taken the PKGBUILD and modified
it for 1.60.

I am currently running gnucash v4.14.

The output for yahoojson is...

gnc-fq-dump -v yahoojson AEI.L
Finance::Quote fields Gnucash uses:
symbol: AEI.L<=== required
  date: **
 missing **<=== recommended
  currency: ** missing **<=== required
  last: **missing**  <=\
   nav: **missing**  <=== one of these
 price: **missing**  <=/
  timezone:  <=== optional

** This stock quote cannot be used by GnuCash!


All fields returned by Finance::Quote for stock AEI.L

stock   field  value
-   -  -
AEI.Lerrormsg: Error retrieving quote for AEI.L. Attempt to
fetch the URL
https://query2.finance.yahoo.com/v11/finance/quoteSummary/?symbols=AEI.L={"finance":{"result":null,"error":{"code":"Unauthorized","description":"Invalid
Cookie"}}}=price,summaryDetail,defaultKeyStatistics resulted in
HTTP response 401 (Unauthorized)
AEI.Llast: **missing**
AEI.L nav: **missing**
AEI.L   price: **missing**
AEI.L success: 0
AEI.L  symbol: AEI.L


The output for yahooweb is...

gnc-fq-dump -v y
ahooweb AEI.L
Finance::Quote fields Gnucash uses:
symbol: AEI.L (deduced)  <=== required
  date: ** missing **<=== recommended
  currency: ** missing **<=== required
  last: **missing**  <=\
   nav: **missing**  <=== one of these
 price: **missing**  <=/
  timezone:  <=== optional

** This stock quote cannot be used by GnuCash!


All fields returned by Finance::Quote for stock AEI.L

stock   field  value
-   -  -
AEI.Lerrormsg: 500 Header line too long (limit is 8192)
AEI.Llast: **missing**
AEI.L nav: **missing**
AEI.L   price: **missing**
AEI.L success: 0

--
Richard


signature.asc
Description: OpenPGP digital signature
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.60 released!

2024-04-17 Thread Adam Griffis
Yes, I have the AlphaVantage api key set. But that's not the issue --
I'm not pulling from AlphaVantage. I'm pulling from YahooJSON.

If I understand correctly, the 1.60 update should include a fix to get
YahooJSON working again, resolving the "cookie and crumb" issue.
However, YahooJSON is still giving me the same error. Is an API key
required for YahooJSON now?

Thanks,
Adam

On Wed, Apr 17, 2024 at 12:45 AM David Carlson
 wrote:
>
> Did you set the API key per the instructions?
>
> On Tue, Apr 16, 2024 at 1:59 PM Adam Griffis  wrote:
>>
>> I installed the latest version of Finance::Quote (1.60), but I'm still
>> getting the same issue when I run price retrieval from GnuCash. Is
>> there something more I need to do?
>>
>> Thanks,
>> Adam
>>
>> On Tue, Apr 16, 2024 at 2:36 AM Bruce Schuck  
>> wrote:
>> >
>> > New version 1.60 of Finance-Quote is available with the following changes:
>> >
>> > * Removed not working modules. Issues #346, #366, and #368.
>> > Fidelity.pm, Cdbfundlibrary.com, Fundata.pm, and Fool.pm.
>> > * YahooJSON.pm - Added code to retrieve cookies and a "crumb" 
>> > required
>> > to continue to utilize the v11 API. Issue #369.
>> > The YahooJSON.pm currency module was changed to use the v8 
>> > API.
>> > * Added initial version of CONTRIBUTING.pod that metacpan.org 
>> > utilizes.
>> > It will completely replace the Hacker's Guide in the 
>> > future.
>> > * Bloomberg.pm - Changed module to extract data from JSON 
>> > structure embedded within the HTML - Issue #360
>> > * NSEIndia.pm - Eliminated need to use temp folders by storing 
>> > file data from URL into a variable.
>> >
>> >
>> > Authors:
>> >   - Erik Colson 
>> >   - Paul Fenwick 
>> >   - Bruce Schuck 
>> >   - Vincent Lucarelli 
>> >   - David Hampton 
>> >   - jvolkening 
>> >   - Pawel Konieczny 
>> >   - Mike Alexander 
>> >   - AndreJ 
>> >   - Vinay S Shastry 
>> >   - Bradley Dean 
>> >   - Brent Neal 
>> >   - Jacinta Richardson 
>> >   - e-dorigatti 
>> >   - goodvibes2 
>> >   - Paul Howarth 
>> >   - Sam Morris 
>> >   - Linas Vepstas 
>> >   - Hiranya Samarasekera 
>> >   - Manuel Friedli 
>> >   - Achim Winkler 
>> >   - Diego Marcolungo 
>> >   - John Haiducek 
>> >   - Rajan Vaswani <111571283+bgr22...@users.noreply.github.com>
>> >   - alex314159 
>> >   - gregor herrmann 
>> >   - Jalon Avens 
>> >   - Sigve Indregard 
>> >   - bgr22112 <111571283+bgr22...@users.noreply.github.com>
>> >   - goodvibes2 
>> >   - Ben Hemming 
>> >   - Caleb Begly 
>> >   - CleanShed <72849657+cleans...@users.noreply.github.com>
>> >   - Eelco Dolstra 
>> >   - Emmanuel Di Pretoro 
>> >   - Florian Schlichting 
>> >   - Gabor Szabo 
>> >   - GitGord <46006740+gitg...@users.noreply.github.com>
>> >   - Gustavo R. Montesino 
>> >   - Henrik Ahlgren 
>> >   - Jean-Marie Pacquet 
>> >   - Joseph Heron 
>> >   - Lance Wicks 
>> >   - Liviu Tinta 
>> >   - Martin Kompf 
>> >   - Pete Ratzlaff 
>> >   - Ross Peachey 
>> >   - Stephan Ebelt 
>> >   - Stephan Gambke 
>> >   - linas 
>> >   - thinus 
>> >   - x42x64 
>> > ___
>> > gnucash-user mailing list
>> > gnucash-user@gnucash.org
>> > To update your subscription preferences or to unsubscribe:
>> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> > -
>> > Please remember to CC this list on all your replies.
>> > You can do this by using Reply-To-List or Reply-All.
>> ___
>> gnucash-user mailing list
>> gnucash-user@gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> -
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
>
>
>
> --
> David Carlson
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.60 released!

2024-04-16 Thread David Carlson
Did you set the API key per the instructions?

On Tue, Apr 16, 2024 at 1:59 PM Adam Griffis  wrote:

> I installed the latest version of Finance::Quote (1.60), but I'm still
> getting the same issue when I run price retrieval from GnuCash. Is
> there something more I need to do?
>
> Thanks,
> Adam
>
> On Tue, Apr 16, 2024 at 2:36 AM Bruce Schuck 
> wrote:
> >
> > New version 1.60 of Finance-Quote is available with the following
> changes:
> >
> > * Removed not working modules. Issues #346, #366, and #368.
> > Fidelity.pm, Cdbfundlibrary.com, Fundata.pm, and Fool.pm.
> > * YahooJSON.pm - Added code to retrieve cookies and a "crumb"
> required
> > to continue to utilize the v11 API. Issue #369.
> > The YahooJSON.pm currency module was changed to use the
> v8 API.
> > * Added initial version of CONTRIBUTING.pod that metacpan.org
> utilizes.
> > It will completely replace the Hacker's Guide in the
> future.
> > * Bloomberg.pm - Changed module to extract data from JSON
> structure embedded within the HTML - Issue #360
> > * NSEIndia.pm - Eliminated need to use temp folders by storing
> file data from URL into a variable.
> >
> >
> > Authors:
> >   - Erik Colson 
> >   - Paul Fenwick 
> >   - Bruce Schuck 
> >   - Vincent Lucarelli 
> >   - David Hampton 
> >   - jvolkening 
> >   - Pawel Konieczny 
> >   - Mike Alexander 
> >   - AndreJ 
> >   - Vinay S Shastry 
> >   - Bradley Dean 
> >   - Brent Neal 
> >   - Jacinta Richardson 
> >   - e-dorigatti 
> >   - goodvibes2 
> >   - Paul Howarth 
> >   - Sam Morris 
> >   - Linas Vepstas 
> >   - Hiranya Samarasekera 
> >   - Manuel Friedli 
> >   - Achim Winkler 
> >   - Diego Marcolungo 
> >   - John Haiducek 
> >   - Rajan Vaswani <111571283+bgr22...@users.noreply.github.com>
> >   - alex314159 
> >   - gregor herrmann 
> >   - Jalon Avens 
> >   - Sigve Indregard 
> >   - bgr22112 <111571283+bgr22...@users.noreply.github.com>
> >   - goodvibes2 
> >   - Ben Hemming 
> >   - Caleb Begly 
> >   - CleanShed <72849657+cleans...@users.noreply.github.com>
> >   - Eelco Dolstra 
> >   - Emmanuel Di Pretoro 
> >   - Florian Schlichting 
> >   - Gabor Szabo 
> >   - GitGord <46006740+gitg...@users.noreply.github.com>
> >   - Gustavo R. Montesino 
> >   - Henrik Ahlgren 
> >   - Jean-Marie Pacquet 
> >   - Joseph Heron 
> >   - Lance Wicks 
> >   - Liviu Tinta 
> >   - Martin Kompf 
> >   - Pete Ratzlaff 
> >   - Ross Peachey 
> >   - Stephan Ebelt 
> >   - Stephan Gambke 
> >   - linas 
> >   - thinus 
> >   - x42x64 
> > ___
> > gnucash-user mailing list
> > gnucash-user@gnucash.org
> > To update your subscription preferences or to unsubscribe:
> > https://lists.gnucash.org/mailman/listinfo/gnucash-user
> > -
> > Please remember to CC this list on all your replies.
> > You can do this by using Reply-To-List or Reply-All.
> ___
> gnucash-user mailing list
> gnucash-user@gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>


-- 
David Carlson
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance-Quote 1.60 released!

2024-04-15 Thread Bruce Schuck
New version 1.60 of Finance-Quote is available with the following changes:

* Removed not working modules. Issues #346, #366, and #368.
Fidelity.pm, Cdbfundlibrary.com, Fundata.pm, and Fool.pm.
* YahooJSON.pm - Added code to retrieve cookies and a "crumb" required
to continue to utilize the v11 API. Issue #369.
The YahooJSON.pm currency module was changed to use the v8 API.
* Added initial version of CONTRIBUTING.pod that metacpan.org utilizes.
It will completely replace the Hacker's Guide in the future.
* Bloomberg.pm - Changed module to extract data from JSON structure 
embedded within the HTML - Issue #360
* NSEIndia.pm - Eliminated need to use temp folders by storing file 
data from URL into a variable.


Authors:
  - Erik Colson 
  - Paul Fenwick 
  - Bruce Schuck 
  - Vincent Lucarelli 
  - David Hampton 
  - jvolkening 
  - Pawel Konieczny 
  - Mike Alexander 
  - AndreJ 
  - Vinay S Shastry 
  - Bradley Dean 
  - Brent Neal 
  - Jacinta Richardson 
  - e-dorigatti 
  - goodvibes2 
  - Paul Howarth 
  - Sam Morris 
  - Linas Vepstas 
  - Hiranya Samarasekera 
  - Manuel Friedli 
  - Achim Winkler 
  - Diego Marcolungo 
  - John Haiducek 
  - Rajan Vaswani <111571283+bgr22...@users.noreply.github.com>
  - alex314159 
  - gregor herrmann 
  - Jalon Avens 
  - Sigve Indregard 
  - bgr22112 <111571283+bgr22...@users.noreply.github.com>
  - goodvibes2 
  - Ben Hemming 
  - Caleb Begly 
  - CleanShed <72849657+cleans...@users.noreply.github.com>
  - Eelco Dolstra 
  - Emmanuel Di Pretoro 
  - Florian Schlichting 
  - Gabor Szabo 
  - GitGord <46006740+gitg...@users.noreply.github.com>
  - Gustavo R. Montesino 
  - Henrik Ahlgren 
  - Jean-Marie Pacquet 
  - Joseph Heron 
  - Lance Wicks 
  - Liviu Tinta 
  - Martin Kompf 
  - Pete Ratzlaff 
  - Ross Peachey 
  - Stephan Ebelt 
  - Stephan Gambke 
  - linas 
  - thinus 
  - x42x64 
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.