A complete desktop application for scraping, processing, analyzing, and visualizing stock market data from NSE (National Stock Exchange) and BSE (Bombay Stock Exchange).
π Now with Interactive Data Processing & Visualization!
This isn't just a scraper anymore - it's a complete market data application with:
- π₯ Data Scraper: Download fresh data from NSE/BSE
- π Data Loader: Load and preview any data file
- βοΈ Data Processor: Filter, search, and transform data
- π Visualizations: Interactive charts and graphs
- π Analytics: Deep insights and trend analysis
- πΎ Export: Save processed data in multiple formats
π Launch with one click! No coding required.
π New to this? Open
index.htmlin your browser for an interactive guide! π± Want the full app? Read the APPLICATION_GUIDE.md for complete documentation!
Double-click start_app.bat
Run ./start_app.sh
Your browser opens with a complete application featuring 5 powerful tabs:
- Scraper - Download fresh data
- Loader - Open existing files
- Processor - Filter and transform
- Visualization - Interactive charts
- Analytics - Deep insights
Make the app accessible from your desktop with one click:
Windows:
Double-click: install_desktop_shortcut.bat
Linux:
./install_desktop_shortcut.shMac:
./install_desktop_shortcut_mac.shAfter installation, find "NSE-BSE Market App" on your desktop and double-click to launch!
π Full instructions: See DESKTOP_INSTALL.md
If you just want to scrape data without the processing features:
Simply double-click the index.html file to open it in your web browser. You'll see:
- Beautiful visual guide
- Interactive command generator
- Step-by-step instructions
- Feature showcase
If you don't have Python installed:
- Windows/Mac: Download from python.org
- Linux: Python is usually pre-installed
Download and extract the project files to a folder on your computer.
On Windows:
- Double-click the
start.batfile - Wait for the installation to complete (first time only)
- Your web browser will open automatically
On Mac/Linux:
- Open Terminal in the project folder
- Run:
./start.sh - Your web browser will open automatically
- Select Exchange: Choose NSE, BSE, or both
- Select Data Types: Check the boxes for what you want
- Set Time Range: Choose how many days of data to fetch
- Click "Start Scraping": Wait for the data to be collected
- Download Your Data: Click the download buttons to get your files
That's it! No coding required!
The web interface provides:
- β Simple checkboxes to select what data you want
- β Progress bar showing scraping status
- β Preview of scraped data in tables
- β One-click download buttons (CSV, JSON, Excel)
- β No technical knowledge needed
- π Circulars & Announcements: Corporate filings and announcements
- π Daily Market Reports: Equity market data and indices
- π’ Latest Announcements: Breaking news and updates
- π Bhavcopy: Complete daily market report
- π Circulars & Announcements: Corporate filings and announcements
- π Daily Market Reports: Market summary and statistics
- π― Corporate Actions: Dividends, splits, bonuses, etc.
- π° News Updates: Latest market news
- π Bhavcopy: Complete daily market report (ZIP)
If you prefer the command line or want to automate tasks:
# Clone the repository
git clone <repository-url>
cd <repository-directory>
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt# Scrape everything from both exchanges
python main.py --exchange both --all
# Scrape NSE circulars and reports
python main.py --exchange nse --circulars --reports
# Scrape BSE data for last 30 days
python main.py --exchange bse --circulars --days 30
# Get help
python main.py --help--exchange: Choose exchange (nse, bse, or both)--circulars: Scrape circulars/announcements--reports: Scrape daily reports--announcements: Scrape announcements (NSE only)--corporate-actions: Scrape corporate actions (BSE only)--news: Scrape news (BSE only)--bhavcopy: Download Bhavcopy--all: Scrape all available data--days: Number of days (default: 7)
You can integrate the scrapers into your own Python code:
from nse_scraper import NSEScraper
# Initialize scraper
scraper = NSEScraper()
# Scrape circulars
circulars = scraper.scrape_circulars(days=7)
# Scrape daily reports
reports = scraper.scrape_daily_reports('equity')
# Save to file
scraper.save_to_file(circulars, 'nse_circulars.json', 'json')from bse_scraper import BSEScraper
# Initialize scraper
scraper = BSEScraper()
# Scrape circulars
circulars = scraper.scrape_circulars(days=7)
# Scrape corporate actions
actions = scraper.scrape_corporate_actions()
# Save to file
scraper.save_to_file(circulars, 'bse_circulars.csv', 'csv')See example.py for more examples.
.
βββ start.sh # Launcher for Mac/Linux (double-click to start)
βββ start.bat # Launcher for Windows (double-click to start)
βββ app.py # Web interface (Streamlit GUI)
βββ main.py # Command line interface
βββ nse_scraper.py # NSE scraper implementation
βββ bse_scraper.py # BSE scraper implementation
βββ base_scraper.py # Base scraper class
βββ config.py # Configuration settings
βββ example.py # Example usage scripts
βββ requirements.txt # Python dependencies
βββ data/ # Output directory (auto-created)
βββ logs/ # Log files (auto-created)
All scraped data is saved to the data/ folder in multiple formats:
- JSON: Complete structured data
- CSV: Open in Excel or Google Sheets
- Excel: Native Excel format (.xlsx)
You can also download files directly from the web interface!
Advanced users can modify config.py to customize:
- Request timeouts
- Retry attempts
- Rate limiting delays
- Log levels
- Output directories
- Make sure Python is installed: Run
python --versionin terminal - Try running the installer manually:
pip install -r requirements.txt - Check that you have internet access
- Check your internet connection
- Verify NSE/BSE websites are accessible
- Check the log files in the
logs/folder - The website structure may have changed (check for updates)
- Manually open your browser and go to:
http://localhost:8501
- Make sure all dependencies are installed:
pip install -r requirements.txt
- Data Accuracy: Always verify critical data with official sources
- Legal Compliance: Use responsibly and follow NSE/BSE terms of service
- Rate Limiting: Don't run the scraper too frequently
- Website Changes: Exchange websites may update their structure
- Educational Use: This tool is for educational and research purposes
- Object-oriented architecture with inheritance
- Comprehensive error handling and retry logic
- Rate limiting to respect server resources
- Detailed logging for debugging
- Multiple output format support
- Configurable parameters
- Clean separation of concerns
- β Automatic retry on failures
- β Graceful error handling
- β Comprehensive logging
- β Rate limiting built-in
- β Session management
- β Data validation
- streamlit: Web interface framework
- requests: HTTP library
- beautifulsoup4: HTML parsing
- pandas: Data manipulation
- lxml: XML/HTML parser
- plotly: Data visualization
- xlsxwriter: Excel file creation
Full list in requirements.txt
Contributions are welcome! Feel free to:
- Submit bug reports
- Suggest new features
- Submit pull requests
- Improve documentation
This project is provided as-is for educational and research purposes.
This scraper is not affiliated with or endorsed by NSE or BSE. Use responsibly and in accordance with the websites' terms of service. The authors are not responsible for any misuse of this tool.
- Start Small: Begin with a short time range (7 days) to test
- Peak Hours: Avoid scraping during market hours for better performance
- Save Regular: Download your data immediately after scraping
- Check Logs: Review log files if something doesn't work
- Update Regularly: Keep the scraper updated for website changes
For issues, questions, or suggestions:
- Open an issue on the project repository
- Check the logs folder for error details
- Review the troubleshooting section above
Made with β€οΈ for stock market enthusiasts
Remember: This tool makes data collection easy, but always verify important information with official sources!