Hello Guys,
New try on Scraping
Can you help me on solving my issue
Thanks Daniel
I’m trying to scrape this number from Technical Analysis of Euro / U.S. Dollar (FX:EURUSD) — TradingView
My Code is:
- resource: https://www.tradingview.com/symbols/EURUSD/technicals/
scan_interval: 200
log_response: true
sensor:
- unique_id: eurusd
name: cci
select: "div:nth-child(1) > div.tableWrapper-Xoorn8RH > table > tbody > tr:nth-child(4) > td:nth-child(2)"
on_error:
log: warning
value: last
And I’m getting this Logs:
2023-01-22 20:34:48.425 DEBUG (MainThread) [custom_components.multiscrape.coordinator] Scraper_noname_0 # New run: start (re)loading data from resource
2023-01-22 20:34:48.425 DEBUG (MainThread) [custom_components.multiscrape.coordinator] Scraper_noname_0 # Deleting logging files from previous run
2023-01-22 20:34:48.432 DEBUG (MainThread) [custom_components.multiscrape.coordinator] Scraper_noname_0 # Rendered resource template into: https://www.tradingview.com/symbols/EURUSD/technicals/
2023-01-22 20:34:48.433 DEBUG (MainThread) [custom_components.multiscrape.coordinator] Scraper_noname_0 # Request data from https://www.tradingview.com/symbols/EURUSD/technicals/
2023-01-22 20:34:48.433 DEBUG (MainThread) [custom_components.multiscrape.http] Scraper_noname_0 # Executing page-request with a get to url: https://www.tradingview.com/symbols/EURUSD/technicals/.
2023-01-22 20:34:48.442 DEBUG (MainThread) [custom_components.multiscrape.http] Scraper_noname_0 # request_headers written to file: page_request_headers.txt
2023-01-22 20:34:48.449 DEBUG (MainThread) [custom_components.multiscrape.http] Scraper_noname_0 # request_body written to file: page_request_body.txt
2023-01-22 20:34:48.724 DEBUG (MainThread) [custom_components.multiscrape.http] Scraper_noname_0 # Response status code received: 200
2023-01-22 20:34:48.727 DEBUG (MainThread) [custom_components.multiscrape.http] Scraper_noname_0 # response_headers written to file: page_response_headers.txt
2023-01-22 20:34:48.732 DEBUG (MainThread) [custom_components.multiscrape.http] Scraper_noname_0 # response_body written to file: page_response_body.txt
2023-01-22 20:34:48.733 DEBUG (MainThread) [custom_components.multiscrape.scraper] Scraper_noname_0 # Loading the content in BeautifulSoup.
2023-01-22 20:34:49.021 DEBUG (MainThread) [custom_components.multiscrape.scraper] Scraper_noname_0 # page_soup written to file: page_soup.txt
2023-01-22 20:34:49.021 DEBUG (MainThread) [custom_components.multiscrape.coordinator] Scraper_noname_0 # Data succesfully refreshed. Sensors will now start scraping to update.
2023-01-22 20:34:49.021 DEBUG (MainThread) [custom_components.multiscrape.coordinator] Finished fetching multiscrape data in 0.596 seconds (success: True)
2023-01-22 20:34:49.021 DEBUG (MainThread) [custom_components.multiscrape.sensor] Scraper_noname_0 # cci # Start scraping to update sensor
2023-01-22 20:34:49.036 DEBUG (MainThread) [custom_components.multiscrape.scraper] Scraper_noname_0 # cci # Tag selected: None
2023-01-22 20:34:49.037 WARNING (MainThread) [custom_components.multiscrape.sensor] Scraper_noname_0 # cci # Unable to scrape data: Could not find a tag for given selector
Consider using debug logging and log_response for further investigation.
2023-01-22 20:34:49.038 DEBUG (MainThread) [custom_components.multiscrape.sensor] Scraper_noname_0 # cci # On-error, keep old value: None
2023-01-22 20:34:49.039 DEBUG (MainThread) [custom_components.multiscrape.entity] Scraper_noname_0 # cci # Sensor updated and state written to HA