yapstocks icon indicating copy to clipboard operation
yapstocks copied to clipboard

Nothing is displayed

Open olm52 opened this issue 1 year ago • 12 comments

Recently this plasmoid is not working. In journal I have these errors:

ott 26 09:24:27 archlinux plasmashell[12165]: qt.svg: Cannot open file '/home/plasma/plasmoids/com.librehat.yapstocks/contents/ui/finance.svg', because: No such file or directory ott 26 09:24:35 archlinux plasmashell[12165]: file:///home/audiolinux/.local/share/plasma/plasmoids/com.librehat.yapstocks/contents/ui/ConfigSymbols.qml:75:22: QML ConfigSymbolViewPage: Binding loop detected for property "symbols" ott 26 09:25:08 archlinux plasmashell[12165]: file:///home/audiolinux/.local/share/plasma/plasmoids/com.librehat.yapstocks/contents/ui/ConfigSymbols.qml:75:22: QML ConfigSymbolViewPage: Binding loop detected for property "symbols" ott 26 09:25:24 archlinux plasmashell[12165]: file:///home/audiolinux/.local/share/plasma/plasmoids/com.librehat.yapstocks/contents/ui/ConfigSymbolViewPage.qml:102: TypeError: Cannot read property 'width' of null

In Archlinux many plasma package names have been changed with "5" suffix Or maybe Yahoo has changed something.

olm52 avatar Oct 26 '23 07:10 olm52

Yapstocks also just stopped working for me, both in Arch and Neon. In both systems the Yapstocks window is blank. Stock lookup is working, though. So I am assuming that it is connecting to Yahoo Finance.

I have tried uninstalling Yapstocks, then reinstalling it. That did not fix the issue.

C8forT avatar Nov 01 '23 08:11 C8forT

The API no longer works

librehat avatar Nov 01 '23 22:11 librehat

@librehat Which API no longer works? Does that mean YapStocks stopped working for good? :'(

TheGeorgeCostanza avatar Nov 16 '23 13:11 TheGeorgeCostanza

Yes. Yahoo changed their API. This plasma widget will no longer work

librehat avatar Nov 17 '23 18:11 librehat

@librehat if you're open to it, it looks like the Yahoo APIs could be somewhat easily replaced with CNBC's APIs. No idea what their Terms of Service are though, I just scraped these from their main page. They don't seem to require any authentication, cookies, user agents, etc. right now.

Some symbols like Futures and Indexes use different syntax than Yahoo, ^DJI vs .DJI, so people would have to reconfigure their widgets.

# search quotes
https://symlookup.cnbc.com/symlookup.do?prefix=Apple&output=json

# get multiple quotes
# multiple symbols joined with "|"
# when a symbol is unchanged (+0.00, +0.00%) , `change` and `change_pct` become the string "UNCH"
https://quote.cnbc.com/quote-html-webservice/restQuote/symbolType/symbol?symbols=AAPL|.DJI|@CL.1|GOOG&requestMethod=itv&noform=1&partnerId=2&fund=1&exthrs=1&output=json&events=1

# time series data for charts
# no idea about that hash at the end
https://webql-redesign.cnbcfm.com/graphql?operationName=getQuoteChartData&variables={"symbol":"GOOG",
"timeRange":"1D"}&extensions={"persistedQuery":{"version":1,"sha256Hash":"61b6376df0a948ce77f977c69531a4a8ed6788c5ebcdd5edd29dd878ce879c8d"}}

#not sure about Profile call

AndyMan1 avatar Nov 18 '23 20:11 AndyMan1

Also /www.marketwatch.com is easier.

For example: VALUE=$(curl -sS https://www.marketwatch.com/investing/stock/TSLA | grep '<meta name="price" content="' | cut -d'"' -f4 | sed 's/$//g') PERCENT=$(curl -sS https://www.marketwatch.com/investing/stock/TSLA | grep '<meta name="priceChange" content="' | cut -d'"' -f4)

olm52 avatar Nov 18 '23 21:11 olm52

The Cinnamon Desklet "Yahoo Finance Quotes" had stopped working, but again works. There is now a "Custom User-Agent header" in the configuration. It includes "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0". I'm not sure if something like this would be useful for Yapstocks.

Anyway, in the mean time, I switched over to Cinnamon until this issue is resolved.

C8forT avatar Nov 19 '23 16:11 C8forT

Thanks all for your suggestions. I'll take a look in the next week or so

librehat avatar Nov 22 '23 19:11 librehat

@librehat Have you had the chance to take a look at this by any chance?

Kombatant avatar Feb 01 '24 23:02 Kombatant

Sorry no, I don't really have time to do any major changes to this project

librehat avatar Feb 02 '24 08:02 librehat

If that's the case I suggest you mention something about it not working in the description and that you have no time to update it; maybe someone else will be interested to maintain it or fork it; it's a great little applet :)

Kombatant avatar Feb 02 '24 13:02 Kombatant

I've updated the readme. I'll soon mark this project as archived

Thank you all for your support when it worked :)

librehat avatar Feb 24 '24 14:02 librehat