This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Yahoo UK - Online Updates Problem

Tags: None
(comma "," separated)
User avatar
NickElliott
Registered Member
Posts
258
Karma
3
OS

Yahoo UK - Online Updates Problem

Tue Nov 23, 2010 12:02 pm
In recent months the share price retrieval from Yahoo UK has been very temperamental, failing more often than not.

I think the parser is having trouble extracting the date, I have tried making some changes but without success.

I've also noticed that the URL has changed, it's currently re-directing to the new one but I don't know for how long.

Can anyone help?


NickElliott, proud to be a member of KDE forums since 2008-Oct.
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
Can you post a URL here so that we can see what's happening? What is the symbol, etc. etc.?


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5
User avatar
NickElliott
Registered Member
Posts
258
Karma
3
OS
No problem.

This happens for all my shares, here is a sample of the output from KMM:
Fetching URL http://uk.finance.yahoo.com/d/quotes.cs ... &f=sl1d3...
Symbol found: "SL.L"
Price found: 215.252 (215.252)
Unable to update price for SL.L (no price or no date)
Fetching URL http://uk.finance.yahoo.com/d/quotes.cs ... &f=sl1d3...
Symbol found: "LLOY.L"
Price found: 63.10 (63.1)
Unable to update price for LLOY.L (no price or no date)
Fetching URL http://uk.finance.yahoo.com/d/quotes.cs ... &f=sl1d3...
Symbol found: "ISYS.L"
Price found: 323.70 (323.7)
Unable to update price for ISYS.L (no price or no date)
Fetching URL http://download.finance.yahoo.com/d/quo ... v&e=.csv...
Symbol found: "BT-A.L"
Price found: 163.10 (163.1)
Unable to update price for BT-A.L (no price or no date)

Here are the details for 'Yahoo UK' from the KMM config file:
[Online-Quote-Source-Yahoo UK]
DateFormatRegex=%m/%d/%y
DateRegex=^[^,]*,[^,]*, [^ ]* (../../....).*
PriceRegex=^[^,]*,([^,]*),.*
SymbolRegex=^([^,]*),.*
URL=http://uk.finance.yahoo.com/d/quotes.csv?s=%1&f=sl1d3


As far as the Yahoo UK URL is concerned I'm not sure if it should be http://uk.finance.yahoo.com or http://download.finance.yahoo.com/

Thanks

Nick


NickElliott, proud to be a member of KDE forums since 2008-Oct.
cristian.onet
KDE Developer
Posts
253
Karma
2
OS
From what I see the date is missing if you request with the d3 parameter. The d1 parameter (Last trade date) seems to work though. Just replace d3 with d1 at the end of your yahoo URL in the kmymoneyrc file.


cristian.onet, proud to be a member of KDE forums since 2008-Oct.
User avatar
NickElliott
Registered Member
Posts
258
Karma
3
OS
Thanks Cristian,

That helped a lot, your suggestion nearly fixed the problem and gave me enough of a clue as to what was going on. I also had to modify the DateRegex parameter before the date would parse correctly.

Here is the working version:
[Online-Quote-Source-Yahoo UK]
DateFormatRegex=%m/%d/%y
DateRegex=(../../....).*
PriceRegex=^[^,]*,([^,]*),.*
SymbolRegex=^([^,]*),.*
URL=http://uk.finance.yahoo.com/d/quotes.csv?s=%1&f=sl1d1

Thanks again,

Nick


NickElliott, proud to be a member of KDE forums since 2008-Oct.
User avatar
NickElliott
Registered Member
Posts
258
Karma
3
OS

Re: Yahoo UK - Online Updates Problem

Thu Dec 09, 2010 11:19 am
This has stopped working again, I don't know if Yahoo keep making changes to the format of the data but it is becoming very frustrating!


NickElliott, proud to be a member of KDE forums since 2008-Oct.
sdimartino
Registered Member
Posts
3
Karma
0
OS
I have had the same problem using Yahoo Canada. I noticed that there was a difference between Yahoo (US) and the Yahoo Canada page where the date was displayed. The US site had a comma after the day and I believe this is what the parser is looking for. I fixed the problem by using the Yahoo (US) site in my stock definitions. Since I have to use ".TO" for Yahoo to recognize my stocks it made no difference whether I used the US or Canadian version of Yahoo's stock quote page and this fixed my problem. I think this should help anyone who is having this problem. Also, I don't understand why Yahoo would have made such a minor change to their quote pages.
mbeenham
Registered Member
Posts
95
Karma
0
OS
Sorry, haven't been on the forums for some time, but this is what I use for yahoo UK without problems:

DateFormatRegex=M,(\\d+/\\d+/\\d+)
DateRegex=[^,]*,[^,]*,[^,]*,"?([^,"]*)"?
PriceRegex=[^,]*,([^,]*),.*
SkipStripping=true
SymbolRegex="([^,"]*)",.*
URL=http://uk.finance.yahoo.com/d/quotes.csv?s=%1&f=sl1t1d1


Linux Mint 17.2
KMyMoney Version 4.7.2
Using KDE Development Platform 4.14.2
User avatar
ipwizard
KDE Developer
Posts
1359
Karma
6
OS
I opened a wish list item to maybe ease this in the future: see https://bugs.kde.org/show_bug.cgi?id=259693 for it.


ipwizard, proud to be a member of the KMyMoney forum since its beginning. :-D
openSuSE Leap 15.4 64bit, KF5


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], lockheed, Sogou [Bot], Yahoo [Bot]