TradingView website - cannot find div for actual chart

118 views
Skip to first unread message

Cyfrif Gwgl

unread,
Jul 4, 2023, 12:41:30 AM7/4/23
to seleniu...@googlegroups.com
I use Selenium with PowerShell, but my question is more about the website that I'm trying to scrape, TradingView. Has anyone done any scraping on the chart itself?

Inspect element is disabled. I've tried inspecting using Dev tools and tried hovering over the entire code bit by bit, but the chart itself never gets highlighted - only the bits around it, so I'm struggling to find where the chart's div is located in the code.

I have a custom indicator moving average line where some sections of it are green and some are red. I want Selenium to look at the most recent section of the line, i.e. the section of line that's between the last two bars, and let me know if it's green or red.

Any help would be appreciated.

I realise I could achieve what I need with an Alert, but TradingView alerts can often be delayed and are generally unreliable, so I want to avoid using alerts.

 I can't add the specific indicator here because it's a private one that requires a logon. But knowing how to scrape any part of the chart would be helpful at this point.

Thanks

SuperKevy

unread,
Jul 4, 2023, 2:38:08 PM7/4/23
to Selenium Users
Maybe you should check the api.   Home | Lightweight Charts (tradingview.github.io) https://tradingview.github.io/lightweight-charts/
They also offer scripts "pine script" a community of shared interests. 

And maybe read the terms of service and remain on the side of ethical behavior.

TradingView is dedicated to providing users with a secure and accessible platform for the display of market data, charts, news, and other financial information. As such, users are strictly prohibited from employing any automated data collection methods, including but not limited to scripts, APIs, screen scraping, data mining, robots, or other data gathering and extraction tools, regardless of their intended purposes.

Reply all
Reply to author
Forward
0 new messages