Bug 402357

Summary: Stock Quotes not working properly - Isolated the issue
Product: [Applications] kmymoney Reporter: Michael Carpino <mfcarpino>
Component: bugtrackerAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED NOT A BUG    
Severity: normal CC: Patrick
Priority: NOR    
Version: git (master)   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Screenshot 1
Screenshot 2

Description Michael Carpino 2018-12-19 18:03:17 UTC
Created attachment 117015 [details]
Screenshot 1

SUMMARY  Recently I reinstalled Linux Manjaro & KMM.  Upon doing this I started having some issues with updating my stock prices. I kept getting the error message: Unable to update price for AXP (no price or no date) when I tried using Yahoo.  See screenshot #1 from the forum post on the details that I copied into the Online Quotes build. So then I went into the kmymoneyrc file and noticed that the information within there isn't the same as I inputted.  So I manually corrected it and saved it as it should be.  Then tested my quotes and everything works as it should.  Please refer to my screenshot 2 that shows my edited Yahoo quote and then also my Yahoo2 quote that shows the difference of the change that the program is inputting.  Basically, it is adding 2 additional "\\" as can be observed by looking within the DateRegex & PriceRegex lines.

If I switch between these 2 quotes I'll get the error with the Yahoo2 and not with the Yahoo manually edited version.  Somewhere within the code, it's adding these additional "\\" and if that can be corrected the stock quote updating should work correctly again.
Comment 1 Michael Carpino 2018-12-19 18:04:22 UTC
Created attachment 117016 [details]
Screenshot 2
Comment 2 Michael Carpino 2018-12-19 18:21:12 UTC
I'm going to close this out as I found the code is working properly and it requires to input the proper information which would be:

URL=https://query1.finance.yahoo.com/v7/finance/quote?fields=regularMarketPrice&symbols=%1

Identifier=%1
Identify by Symbol

Price="regularMarketPrice":((\d+|\d{1,3}(?:[,]\d{3})).\d+)

Date="regularMarketTime":([\d]+)

Skip HTML stripping = checked