iprak / yahoofinance

Home Assistant component which allows you to get stock updates from Yahoo finance.
MIT License
81 stars 11 forks source link

Yahoo Integreation HACS #103

Closed Johnyboy1984 closed 11 months ago

Johnyboy1984 commented 1 year ago

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.yahoofinance.coordinator Source: custom_components/yahoofinance/coordinator.py:367 Integration: Yahoo Finance (documentation, issues) First occurred: 17:13:08 (1 occurrences) Last logged: 17:13:08

Received status 401 (Unauthorized Invalid Crumb. For Developers - https://bit.ly/yahoo-finance-api-feedback) for https://query1.finance.yahoo.com/v7/finance/quote?symbols=DTE.DE,DE0008007519.SG,0P00016L65.F,UIV4.MU&crumb=DO1beSScNJ4

jamespreedy commented 1 year ago

I've been seeing the same for a couple of weeks now.

`This error originated from a custom integration.

Logger: custom_components.yahoofinance.coordinator Source: custom_components/yahoofinance/coordinator.py:367 Integration: Yahoo Finance (documentation, issues) First occurred: 9:39:52 pm (1 occurrences) Last logged: 9:39:52 pm

Received status 401 (Unauthorized Invalid Crumb. For Developers - https://bit.ly/yahoo-finance-api-feedback) for https://query1.finance.yahoo.com/v7/finance/quote?symbols=AAPL,GBPUSD=X&crumb=DO1beSScNJ4`

and

`This error originated from a custom integration.

Logger: custom_components.yahoofinance.coordinator Source: helpers/update_coordinator.py:262 Integration: Yahoo Finance (documentation, issues) First occurred: 9:39:52 pm (1 occurrences) Last logged: 9:39:52 pm

Error fetching YahooSymbolUpdateCoordinator data: No data received`

Please let me know if there's any extra information I can get you to help.

Johnyboy1984 commented 1 year ago

Good evening,

this problem still exists at the moment. Have a timeline for when you want to solve this problem. The first message from me was on August 13, 2023 (i.e. 3 months ago).

The following messages are and were at the time, the problem (in pictures):

image

image

The following messages are and were at the time the problem (in text form):

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.yahoofinance.coordinator Source: helpers/update_coordinator.py:322 Integration: Yahoo Finance (documentation, issues) First occurred: 20:35:08 (1 occurrences) Last logged: 20:35:08

Error fetching YahooSymbolUpdateCoordinator data: No data received

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.yahoofinance.coordinator Source: custom_components/yahoofinance/coordinator.py:308 Integration: Yahoo Finance (documentation, issues) First occurred: 20:35:08 (1 occurrences) Last logged: 20:35:08

Received status 401 (Unauthorized Invalid Crumb. For Developers - https://bit.ly/yahoo-finance-api-feedback) for https://query1.finance.yahoo.com/v7/finance/quote?symbols=DTE.DE,DE0008007519.SG,0P00016L65.F,UIV4.MU&crumb=Ifl3m540IJx

iprak commented 12 months ago

In EU, initial request to yahoo Finance goes through a consent page from which the cookies and crumb is extracted which is then used in actual data request. Either the extraction is failing or something else has changed in that workflow.

You can enable debug logging like this, then you should see more details. In addition, the content from which crumbs is extracted gets saved to YahooFinanceCrumbContent.log in config folder. This might tell what is happening.

logger:
  default: warn
  logs:    
    custom_components.yahoofinance: debug

@swiergot, are you seeing something this like too?

swiergot commented 12 months ago

Indeed I am, but apparently it's occasional, I didn't even notice it before you asked. I will try to look into it.

antivirus68 commented 11 months ago

Hi @iprak ,

I have the same problem, since this summer. I enabled debug, as you suggested and here it is:

2023-12-08 12:17:53.151 INFO (MainThread) [custom_components.yahoofinance] Total 1 unique scan intervals 2023-12-08 12:17:53.152 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Getting crumb from from https://finance.yahoo.com/quote/NQ%3DF 2023-12-08 12:17:55.720 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Response status: 200, URL: https://consent.yahoo.com/v2/collectConsent?sessionId=3_cc-session_8f676f29-8616-4791-964a-52378abcfb8f 2023-12-08 12:17:55.720 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Cookies consent page detected 2023-12-08 12:17:55.720 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Form field: name=csrfToken value=WNj6dHP 2023-12-08 12:17:55.720 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Form field: name=sessionId value=3_cc-session_8f676f29-8616-4791-964a-52378abcfb8f 2023-12-08 12:17:55.720 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Form field: name=originalDoneUrl value=https://finance.yahoo.com/quote/NQ=F?guccounter=1 2023-12-08 12:17:55.720 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Form field: name=namespace value=yahoo 2023-12-08 12:17:56.473 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Response Status: 200, URL: https://finance.yahoo.com/quote/NQ=F?guccounter=1 2023-12-08 12:17:56.862 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Cookies: 2023-12-08 12:17:56.863 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Start position: 826353 2023-12-08 12:17:56.863 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] End position: 826373 2023-12-08 12:17:56.863 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Crumb=jHsuXobYgvA 2023-12-08 12:17:56.863 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Got crumb jHsuXobYgvA 2023-12-08 12:17:56.863 INFO (MainThread) [custom_components.yahoofinance] Creating coordinator with scan_interval 12:00:00 for symbols ['EXAI.MI', 'EURGBP=X'] 2023-12-08 12:17:56.864 INFO (MainThread) [custom_components.yahoofinance] Requesting initial data from coordinator with update interval of 12:00:00. 2023-12-08 12:17:56.864 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Requesting data from 'https://query1.finance.yahoo.com/v7/finance/quote?symbols=EXAI.MI,EURGBP=X&crumb=jHsuXobYgvA' 2023-12-08 12:17:57.030 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Received status 401 (Unauthorized Invalid Crumb. For Developers - https://bit.ly/yahoo-finance-api-feedback) for https://query1.finance.yahoo.com/v7/finance/quote?symbols=EXAI.MI,EURGBP=X&crumb=jHsuXobYgvA 2023-12-08 12:17:57.030 ERROR (MainThread) [custom_components.yahoofinance.coordinator] Error fetching YahooSymbolUpdateCoordinator data: No data received 2023-12-08 12:17:57.030 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Finished fetching YahooSymbolUpdateCoordinator data in 0.166 seconds (success: False) 2023-12-08 12:17:57.030 DEBUG (MainThread) [custom_components.yahoofinance] Coordinator did not report any data, requesting async_refresh 2023-12-08 12:17:57.032 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Getting crumb from from https://finance.yahoo.com/quote/NQ%3DF 2023-12-08 12:17:57.939 DEBUG (MainThread) [custom_components.yahoofinance.sensor] Created entity for target_currency=None 2023-12-08 12:17:57.939 DEBUG (MainThread) [custom_components.yahoofinance.sensor] EXAI.MI Coordinator data is None 2023-12-08 12:17:57.939 DEBUG (MainThread) [custom_components.yahoofinance.sensor] Created entity for target_currency=None 2023-12-08 12:17:57.939 DEBUG (MainThread) [custom_components.yahoofinance.sensor] EURGBP=X Coordinator data is None 2023-12-08 12:17:57.939 INFO (MainThread) [custom_components.yahoofinance.sensor] Entities added for ['EXAI.MI', 'EURGBP=X'] 2023-12-08 12:17:57.951 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Response status: 200, URL: https://finance.yahoo.com/quote/NQ=F 2023-12-08 12:17:57.957 WARNING (MainThread) [custom_components.yahoofinance.coordinator] Error obtaining data, retrying in 20 seconds. 2023-12-08 12:17:57.957 DEBUG (MainThread) [custom_components.yahoofinance.sensor] EXAI.MI available=False 2023-12-08 12:17:57.957 DEBUG (MainThread) [custom_components.yahoofinance.sensor] EURGBP=X available=False 2023-12-08 12:17:58.061 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Cookies: 2023-12-08 12:17:58.062 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Start position: 829616 2023-12-08 12:17:58.062 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] End position: 829636 2023-12-08 12:17:58.062 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Crumb=lXYr9rz2RWy 2023-12-08 12:17:58.062 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Got crumb lXYr9rz2RWy 2023-12-08 12:17:58.062 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Requesting data from 'https://query1.finance.yahoo.com/v7/finance/quote?symbols=EXAI.MI,EURGBP=X&crumb=lXYr9rz2RWy' 2023-12-08 12:17:58.168 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Updated EXAI.MI to 0.85 2023-12-08 12:17:58.168 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Updated EURGBP=X to 0.85697 2023-12-08 12:17:58.168 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Data = [{'language': 'en-US', 'region': 'US', 'quoteType': 'EQUITY', 'typeDisp': 'Equity', 'quoteSourceName': 'Delayed Quote', 'triggerable': False, 'customPriceAlertConfidence': 'LOW', 'currency': 'EUR', 'exchange': 'MIL', 'shortName': 'EXPERT.AI', 'longName': 'Expert.ai S.p.A.', 'messageBoardId': 'finmb_33803738', 'exchangeTimezoneName': 'Europe/Rome', 'exchangeTimezoneShortName': 'CET', 'gmtOffSetMilliseconds': 3600000, 'market': 'it_market', 'esgPopulated': False, 'regularMarketChangePercent': 1.1904821, 'regularMarketPrice': 0.85, 'marketState': 'REGULAR', 'firstTradeDateMilliseconds': 1392710400000, 'priceHint': 4, 'regularMarketChange': 0.01000005, 'regularMarketTime': 1702030920, 'regularMarketDayHigh': 0.861, 'regularMarketDayRange': '0.841 - 0.861', 'regularMarketDayLow': 0.841, 'regularMarketVolume': 28693, 'regularMarketPreviousClose': 0.84, 'bid': 0.847, 'ask': 0.851, 'fullExchangeName': 'Milan', 'financialCurrency': 'EUR', 'regularMarketOpen': 0.852, 'averageDailyVolume3Month': 145953, 'averageDailyVolume10Day': 250740, 'fiftyTwoWeekLowChange': 0.27000004, 'fiftyTwoWeekLowChangePercent': 0.4655173, 'fiftyTwoWeekRange': '0.58 - 1.156', 'fiftyTwoWeekHighChange': -0.306, 'fiftyTwoWeekHighChangePercent': -0.26470587, 'fiftyTwoWeekLow': 0.58, 'fiftyTwoWeekHigh': 1.156, 'fiftyTwoWeekChangePercent': 37.030994, 'earningsTimestamp': 1695898740, 'earningsTimestampStart': 1695898740, 'earningsTimestampEnd': 1695898740, 'trailingAnnualDividendRate': 0.0, 'trailingAnnualDividendYield': 0.0, 'epsTrailingTwelveMonths': -0.15, 'epsForward': -0.04, 'epsCurrentYear': -0.14, 'priceEpsCurrentYear': -6.071429, 'sharesOutstanding': 68901800, 'bookValue': 0.161, 'fiftyDayAverage': 0.83524, 'fiftyDayAverageChange': 0.014760017, 'fiftyDayAverageChangePercent': 0.017671589, 'twoHundredDayAverage': 0.878985, 'twoHundredDayAverageChange': -0.028984964, 'twoHundredDayAverageChangePercent': -0.032975495, 'marketCap': 58566532, 'forwardPE': -21.250002, 'priceToBook': 5.2795033, 'sourceInterval': 20, 'exchangeDataDelayedBy': 15, 'averageAnalystRating': '2.0 - Buy', 'tradeable': False, 'cryptoTradeable': False, 'symbol': 'EXAI.MI'}, {'language': 'en-US', 'region': 'US', 'quoteType': 'CURRENCY', 'typeDisp': 'Currency', 'quoteSourceName': 'Delayed Quote', 'triggerable': True, 'customPriceAlertConfidence': 'HIGH', 'currency': 'GBP', 'exchange': 'CCY', 'shortName': 'EUR/GBP', 'longName': 'EUR/GBP', 'messageBoardId': 'finmb_EURGBP_X', 'exchangeTimezoneName': 'Europe/London', 'exchangeTimezoneShortName': 'GMT', 'gmtOffSetMilliseconds': 0, 'market': 'ccy_market', 'esgPopulated': False, 'regularMarketChangePercent': -0.017496416, 'regularMarketPrice': 0.85697, 'marketState': 'REGULAR', 'firstTradeDateMilliseconds': 915408000000, 'priceHint': 4, 'regularMarketChange': -0.00014996529, 'regularMarketTime': 1702034276, 'regularMarketDayHigh': 0.85855, 'regularMarketDayRange': '0.85637 - 0.85855', 'regularMarketDayLow': 0.85637, 'regularMarketVolume': 0, 'regularMarketPreviousClose': 0.85712, 'bid': 0.85695, 'ask': 0.85704, 'bidSize': 0, 'askSize': 0, 'fullExchangeName': 'CCY', 'regularMarketOpen': 0.85709, 'averageDailyVolume3Month': 0, 'averageDailyVolume10Day': 0, 'fiftyTwoWeekLowChange': 0.007550001, 'fiftyTwoWeekLowChangePercent': 0.008888419, 'fiftyTwoWeekRange': '0.84942 - 0.89778', 'fiftyTwoWeekHighChange': -0.04080999, 'fiftyTwoWeekHighChangePercent': -0.04545656, 'fiftyTwoWeekLow': 0.84942, 'fiftyTwoWeekHigh': 0.89778, 'fiftyTwoWeekChangePercent': -0.64907074, 'fiftyDayAverage': 0.8679144, 'fiftyDayAverageChange': -0.010944366, 'fiftyDayAverageChangePercent': -0.012609961, 'twoHundredDayAverage': 0.8672395, 'twoHundredDayAverageChange': -0.010269463, 'twoHundredDayAverageChangePercent': -0.011841554, 'sourceInterval': 15, 'exchangeDataDelayedBy': 0, 'tradeable': False, 'cryptoTradeable': False, 'symbol': 'EURGBP=X'}] 2023-12-08 12:17:58.168 INFO (MainThread) [custom_components.yahoofinance.coordinator] Data updated [interval=12:00:00] 2023-12-08 12:17:58.168 INFO (MainThread) [custom_components.yahoofinance.coordinator] Fetching YahooSymbolUpdateCoordinator data recovered 2023-12-08 12:17:58.168 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Finished fetching YahooSymbolUpdateCoordinator data in 1.137 seconds (success: True) 2023-12-08 12:17:58.168 DEBUG (MainThread) [custom_components.yahoofinance.sensor] EXAI.MI currency=EUR financialCurrency=EUR 2023-12-08 12:17:58.168 DEBUG (MainThread) [custom_components.yahoofinance.sensor] EXAI.MI available=True 2023-12-08 12:17:58.169 DEBUG (MainThread) [custom_components.yahoofinance.sensor] EURGBP=X currency=GBP financialCurrency=None 2023-12-08 12:17:58.169 DEBUG (MainThread) [custom_components.yahoofinance.sensor] EURGBP=X available=True

I get the error every time restart HA. Once HA is running it starts to work fine and I don't get any more error.

I looked for YahooFinanceCrumbContent.log file in config folder but I didn't find any.

Hope this can help.

Best, Marco

iprak commented 11 months ago

I am not sure if something has changed related to how consent is processed in GDPR case. The previous process to intercept and parse crumb still works but as noted in debug logging, the website denies it.

I am trying a different approach which seems to work in GDPR case (testing via VPN) and in non-GDPR.

@swiergot, @antivirus68 could you try my new approach?

The changes are in the branch https://github.com/iprak/yahoofinance/tree/handle_failing_crumb_GDPR. You would need to copy these 2 changes files into your HomeAssistant's custom_components\yahoofinance folder.

antivirus68 commented 11 months ago

I just tried out and it looks it works! This is my log on HA reboot:

2023-12-10 09:01:37.606 INFO (MainThread) [custom_components.yahoofinance] Total 1 unique scan intervals 2023-12-10 09:01:37.607 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Navigating to a base Yahoo page 2023-12-10 09:01:41.327 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Response 200, URL: https://consent.yahoo.com/v2/collectConsent?sessionId=3_cc-session_f4a2b297-3fc2-4463-a7de-df78e29c4ab5 2023-12-10 09:01:41.327 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Cookies: 2023-12-10 09:01:41.327 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Consent page detected 2023-12-10 09:01:41.328 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Posting consent {'reject': 'reject', 'csrfToken': 'OvaBrEE', 'sessionId': '3_cc-session_f4a2b297-3fc2-4463-a7de-df78e29c4ab5', 'originalDoneUrl': 'https://finance.yahoo.com/quote/NQ=F?guccounter=1', 'namespace': 'yahoo'} 2023-12-10 09:01:41.750 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Consent post response 200, URL: https://finance.yahoo.com/quote/NQ=F?guccounter=1 2023-12-10 09:01:41.750 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Accessing crumb page 2023-12-10 09:01:42.284 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Crumb response status: 200, URL: https://query2.finance.yahoo.com/v1/test/getcrumb 2023-12-10 09:01:42.284 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Crumb page reported MPjNEJHrv/v 2023-12-10 09:01:42.284 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Crumb: MPjNEJHrv/v 2023-12-10 09:01:42.284 INFO (MainThread) [custom_components.yahoofinance] Creating coordinator with scan_interval 12:00:00 for symbols ['EXAI.MI', 'EURGBP=X'] 2023-12-10 09:01:42.284 INFO (MainThread) [custom_components.yahoofinance] Requesting initial data from coordinator with update interval of 12:00:00. 2023-12-10 09:01:42.286 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Requesting data from 'https://query1.finance.yahoo.com/v7/finance/quote?symbols=EXAI.MI,EURGBP=X&crumb=MPjNEJHrv/v' 2023-12-10 09:01:42.530 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Updated EXAI.MI to 0.856 2023-12-10 09:01:42.530 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Updated EURGBP=X to 0.85772 2023-12-10 09:01:42.530 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Data = [{'language': 'en-US', 'region': 'US', 'quoteType': 'EQUITY', 'typeDisp': 'Equity', 'quoteSourceName': 'Delayed Quote', 'triggerable': False, 'customPriceAlertConfidence': 'LOW', 'currency': 'EUR', 'marketState': 'CLOSED', 'regularMarketChangePercent': 1.9047658, 'regularMarketPrice': 0.856, 'exchange': 'MIL', 'shortName': 'EXPERT.AI', 'longName': 'Expert.ai S.p.A.', 'messageBoardId': 'finmb_33803738', 'exchangeTimezoneName': 'Europe/Rome', 'exchangeTimezoneShortName': 'CET', 'gmtOffSetMilliseconds': 3600000, 'market': 'it_market', 'esgPopulated': False, 'firstTradeDateMilliseconds': 1392710400000, 'priceHint': 4, 'regularMarketChange': 0.016000032, 'regularMarketTime': 1702053324, 'regularMarketDayHigh': 0.883, 'regularMarketDayRange': '0.841 - 0.883', 'regularMarketDayLow': 0.841, 'regularMarketVolume': 125903, 'regularMarketPreviousClose': 0.84, 'bid': 0.86, 'ask': 0.871, 'fullExchangeName': 'Milan', 'financialCurrency': 'EUR', 'regularMarketOpen': 0.852, 'averageDailyVolume3Month': 144348, 'averageDailyVolume10Day': 186528, 'fiftyTwoWeekLowChange': 0.27600002, 'fiftyTwoWeekLowChangePercent': 0.47586212, 'fiftyTwoWeekRange': '0.58 - 1.156', 'fiftyTwoWeekHighChange': -0.3, 'fiftyTwoWeekHighChangePercent': -0.25951558, 'fiftyTwoWeekLow': 0.58, 'fiftyTwoWeekHigh': 1.156, 'fiftyTwoWeekChangePercent': 40.55829, 'earningsTimestamp': 1695898740, 'earningsTimestampStart': 1695898740, 'earningsTimestampEnd': 1695898740, 'trailingAnnualDividendRate': 0.0, 'trailingAnnualDividendYield': 0.0, 'epsTrailingTwelveMonths': -0.15, 'epsForward': -0.04, 'epsCurrentYear': -0.14, 'priceEpsCurrentYear': -6.114286, 'sharesOutstanding': 68901800, 'bookValue': 0.161, 'fiftyDayAverage': 0.82974, 'fiftyDayAverageChange': 0.026260018, 'fiftyDayAverageChangePercent': 0.03164849, 'twoHundredDayAverage': 0.879665, 'twoHundredDayAverageChange': -0.02366501, 'twoHundredDayAverageChangePercent': -0.0269023, 'marketCap': 58979940, 'forwardPE': -21.400002, 'priceToBook': 5.31677, 'sourceInterval': 20, 'exchangeDataDelayedBy': 15, 'averageAnalystRating': '2.0 - Buy', 'tradeable': False, 'cryptoTradeable': False, 'symbol': 'EXAI.MI'}, {'language': 'en-US', 'region': 'US', 'quoteType': 'CURRENCY', 'typeDisp': 'Currency', 'quoteSourceName': 'Delayed Quote', 'triggerable': True, 'customPriceAlertConfidence': 'HIGH', 'currency': 'GBP', 'marketState': 'CLOSED', 'regularMarketChangePercent': 0.07000653, 'regularMarketPrice': 0.85772, 'exchange': 'CCY', 'shortName': 'EUR/GBP', 'longName': 'EUR/GBP', 'messageBoardId': 'finmb_EURGBP_X', 'exchangeTimezoneName': 'Europe/London', 'exchangeTimezoneShortName': 'GMT', 'gmtOffSetMilliseconds': 0, 'market': 'ccy_market', 'esgPopulated': False, 'firstTradeDateMilliseconds': 915408000000, 'priceHint': 4, 'regularMarketChange': 0.00060003996, 'regularMarketTime': 1702074526, 'regularMarketDayHigh': 0.85882, 'regularMarketDayRange': '0.85637 - 0.85882', 'regularMarketDayLow': 0.85637, 'regularMarketVolume': 0, 'regularMarketPreviousClose': 0.85712, 'bid': 0.85772, 'ask': 0.85777, 'bidSize': 0, 'askSize': 0, 'fullExchangeName': 'CCY', 'regularMarketOpen': 0.85709, 'averageDailyVolume3Month': 0, 'averageDailyVolume10Day': 0, 'fiftyTwoWeekLowChange': 0.008300006, 'fiftyTwoWeekLowChangePercent': 0.009771381, 'fiftyTwoWeekRange': '0.84942 - 0.89778', 'fiftyTwoWeekHighChange': -0.040059984, 'fiftyTwoWeekHighChangePercent': -0.04462116, 'fiftyTwoWeekLow': 0.84942, 'fiftyTwoWeekHigh': 0.89778, 'fiftyTwoWeekChangePercent': -0.23282766, 'fiftyDayAverage': 0.8677466, 'fiftyDayAverageChange': -0.010026574, 'fiftyDayAverageChangePercent': -0.011554726, 'twoHundredDayAverage': 0.8670902, 'twoHundredDayAverageChange': -0.009370208, 'twoHundredDayAverageChangePercent': -0.010806497, 'sourceInterval': 15, 'exchangeDataDelayedBy': 0, 'tradeable': False, 'cryptoTradeable': False, 'symbol': 'EURGBP=X'}] 2023-12-10 09:01:42.530 INFO (MainThread) [custom_components.yahoofinance.coordinator] Data updated [interval=12:00:00] 2023-12-10 09:01:42.530 DEBUG (MainThread) [custom_components.yahoofinance.coordinator] Finished fetching YahooSymbolUpdateCoordinator data in 0.244 seconds (success: True) 2023-12-10 09:01:43.295 DEBUG (MainThread) [custom_components.yahoofinance.sensor] Created entity for target_currency=None 2023-12-10 09:01:43.295 DEBUG (MainThread) [custom_components.yahoofinance.sensor] EXAI.MI currency=EUR financialCurrency=EUR 2023-12-10 09:01:43.295 DEBUG (MainThread) [custom_components.yahoofinance.sensor] Created entity for target_currency=None 2023-12-10 09:01:43.295 DEBUG (MainThread) [custom_components.yahoofinance.sensor] EURGBP=X currency=GBP financialCurrency=None 2023-12-10 09:01:43.295 INFO (MainThread) [custom_components.yahoofinance.sensor] Entities added for ['EXAI.MI', 'EURGBP=X'] 2023-12-10 09:01:43.298 DEBUG (MainThread) [custom_components.yahoofinance.sensor] EXAI.MI available=True 2023-12-10 09:01:43.298 DEBUG (MainThread) [custom_components.yahoofinance.sensor] EURGBP=X available=True

No more errors.

Thanks @iprak

Johnyboy1984 commented 11 months ago

Ich bin mir nicht sicher, ob sich an der Art und Weise, wie die Einwilligung im DSGVO-Fall verarbeitet wird, etwas geändert hat. Der vorherige Prozess zum Abfangen und Analysieren von Krümel funktioniert weiterhin, aber wie in der Debug-Protokollierung vermerkt, wird dies von der Website abgelehnt.

Ich versuche einen anderen Ansatz, der im DSGVO-Fall (Testen über VPN) und im Nicht-DSGVO-Fall zu funktionieren scheint.

@swiergot,@antivirus68 Könnten Sie meinen neuen Ansatz ausprobieren?

Die Änderungen finden Sie im Zweig https://github.com/iprak/yahoofinance/tree/handle_failing_crumb_GDPR . Sie müssten diese beiden Änderungsdateien in den custom_components\yahoofinanceOrdner Ihres HomeAssistant kopieren.

  • custom_components/yahoofinance/const.py
  • custom_components/yahoofinance/coordinator.py

Good morning,

I followed your instructions exactly and can also confirm that it works afterwards and the error no longer occurs.

Thank you

Best regards

Johnyboy1984