librehat / yapstocks

Yet Another Plasma Stocks Applet
GNU General Public License v3.0
23 stars 7 forks source link

Nothing is displayed #23

Open olm52 opened 8 months ago

olm52 commented 8 months ago

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.

C8forT commented 8 months ago

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.

librehat commented 8 months ago

The API no longer works

TheGeorgeCostanza commented 7 months ago

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

librehat commented 7 months ago

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

AndyMan1 commented 7 months ago

@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
olm52 commented 7 months ago

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)

C8forT commented 7 months ago

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.

librehat commented 7 months ago

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

Kombatant commented 5 months ago

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

librehat commented 5 months ago

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

Kombatant commented 5 months ago

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 :)

librehat commented 4 months ago

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

Thank you all for your support when it worked :)