TradingView PineScript Downloader
A concurrent web scraper written in Python using Selenium and aiohttp to download PineScripts from TradingView, a popular online community of traders.
- Concurrent Page Downloading: I built this to take advantage of multi-core processors by downloading multiple pages concurrently.
- PineScript Code Extraction: One cool feature is the ability to extract and save PineScript code from TradingView's script pages, which can then be used for backtesting or other purposes.
- Headless Browsing: I configured Firefox to run in headless mode using geckodriver, making it possible to scrape content without displaying any browser windows.
- Directory Management: The project creates a designated directory for storing downloaded PineScripts and checks if files already exist before saving them again.
Before running the script, make sure you have:
- Python installed on your machine (
python --version
) geckodriver
executable in your system's PATH (download from here)- Required libraries:
selenium
aiohttp
BeautifulSoup4
You can install them using pip:
pip install -r requirements.txt
Run the script with Python, and it will start downloading PineScripts from TradingView in a concurrent manner. You can adjust the number of concurrent pages by modifying the num_concurrent_pages
variable.
python main.py
If you'd like to contribute or report any issues, feel free to open a pull request on GitHub: TradingView PineScript Downloader
This project is licensed under the MIT License. See LICENSE file for details.
- TradingView
- PineScript
- Web Scraping
- Selenium
- Aiohttp
- Concurrent Downloading