Python scraper for the BitChute video platform. It allows you to query for videos and to retrieve platform recommendations such as trending videos, popular videos (now called "fresh") or trending tags. The release of version 1.0.0 is a major update using an API approach to data collection compared to the Selenium based scraper of now defunct previous versions. Since the codebase was completely rewritten in collaboration with Claude AI backwards compatibility is not provided.
- Fast API-based data collection - 10x faster than HTML parsing approaches
- Intelligent content deduplication - Never download the same file twice
- Automatic media downloads - Thumbnails and videos with smart caching
- Comprehensive data models - Videos, channels, hashtags with computed properties
- Concurrent processing - Parallel requests with configurable rate limiting
- Multiple export formats - CSV, JSON, Excel, Parquet with timestamps
- Command-line interface - Easy automation and scripting support
- Robust error handling - Automatic retries and graceful fallbacks
- Advanced monitoring - Real-time statistics and performance tracking
- Token debugging tools - Resolve authentication issues automatically
Install from PyPI:
pip3 install bitchute-scraperFor full functionality including progress bars and fast data formats:
pip install bitchute-scraper[full]- Python 3.7+
- Google Chrome or Chromium browser
- ChromeDriver (auto-managed)
import bitchute
# Initialize API client
api = bitchute.BitChuteAPI(verbose=True)
# Get trending videos
trending = api.get_trending_videos('day', limit=50)
print(f"Retrieved {len(trending)} trending videos")
# Search for videos
results = api.search_videos('climate change', limit=100)
# Get video details
video_info = api.get_video_info('VIDEO_ID', include_counts=True)# Initialize with downloads enabled
api = bitchute.BitChuteAPI(
enable_downloads=True,
download_base_dir="downloads",
verbose=True
)
# Download videos with thumbnails
videos = api.get_trending_videos(
'week',
limit=20,
download_thumbnails=True,
download_videos=True
)from bitchute.utils import DataExporter
# Get data and export to multiple formats
videos = api.get_popular_videos(limit=100)
exporter = DataExporter()
exported_files = exporter.export_data(
videos,
'popular_videos',
['csv', 'json', 'xlsx']
)combined_stats = api.get_combined_stats()
api.print_stats_summary(show_detailed=True)# Get database information
db_info = api.get_download_database_info()
print(f"Database contains {db_info['total_entries']} unique items")
print(f"Total storage tracked: {db_info['total_size_formatted']}")
# Clean up orphaned entries
api.cleanup_download_database(verify_files=True)
# Reset statistics for new measurement period
api.reset_download_stats()# Get trending videos
bitchute trending --timeframe day --limit 50 --format csv
# Search videos with details
bitchute search "bitcoin" --limit 100 --sort views --analyze
# Export to Excel
bitchute popular --limit 200 --format xlsx --analyzePlatform Recommendations:
get_trending_videos(timeframe, limit)- Trending by day/week/monthget_popular_videos(limit)- Popular videosget_recent_videos(limit)- Most recent uploadsget_short_videos(limit)- Short-form content
Search Functions:
search_videos(query, sensitivity, sort, limit)- Video searchsearch_channels(query, sensitivity, limit)- Channel search
Individual Items:
get_video_info(video_id, include_counts, include_media)- Single video detailsget_channel_info(channel_id)- Channel information
Hashtags:
get_trending_hashtags(limit)- Trending hashtagsget_videos_by_hashtag(hashtag, limit)- Videos by hashtag
Statistics & Monitoring:
get_download_stats()- Download performance metricsget_combined_stats()- Comprehensive API and download statisticsprint_stats_summary()- Formatted statistics displayreset_download_stats()- Reset performance counters
Troubleshooting:
debug_token_issues()- Comprehensive authentication diagnosisfix_token_issues()- Automatic token issue resolutioncleanup_download_database()- Database maintenance
api = bitchute.BitChuteAPI(
verbose=True, # Enable logging
enable_downloads=True, # Enable media downloads
download_base_dir="data", # Download directory
max_concurrent_downloads=5, # Concurrent downloads
force_redownload=False, # Skip existing files
rate_limit=0.3, # Seconds between requests
timeout=60, # Request timeout
cache_tokens=True # Cache authentication tokens
)All methods return pandas DataFrames with consistent schemas:
- Video: Complete metadata with engagement metrics and download paths
- Channel: Channel information with statistics and social links
- Hashtag: Trending hashtags with rankings and video counts
# Get large datasets efficiently
all_videos = api.get_all_videos(limit=5000, include_details=True)
# Process with filtering
from bitchute.utils import ContentFilter
filtered = ContentFilter.filter_by_views(all_videos, min_views=1000)
crypto_videos = ContentFilter.filter_by_keywords(filtered, ['bitcoin', 'crypto'])# Track download performance
stats = api.get_download_stats()
print(f"Success rate: {stats['success_rate']:.1%}")
print(f"Total downloaded: {stats['total_bytes_formatted']}")Symptoms:
- "Token invalid, attempting refresh" messages
- All extraction methods failing
- Cached token corruption
- API requests returning 401/403 errors
# Step 1: Run comprehensive diagnosis
api = bitchute.BitChuteAPI(verbose=True)
debug_info = api.debug_token_issues()
# Step 2: Attempt automatic fix
if not debug_info['token_info']['is_valid']:
print("π§ Attempting automatic recovery...")
token = api.fix_token_issues()
if token:
print("β
Recovery successful!")
else:
print("β Manual intervention required")
# Step 3: Manual troubleshooting if needed
if not token:
print("\nπ Manual troubleshooting steps:")
for recommendation in debug_info['recommendations']:
print(f" β’ {recommendation}")# Clear all caches and retry
api.token_manager.clear_all_caches()
token = api.get_token()
# Test specific token
if token:
validation_results = api.token_manager.test_token_validation(token)
print(f"Token validation: {validation_results}")
# Force fresh extraction
api.token_manager.invalidate_token()
new_token = api.token_manager.get_token()- API Reference: Complete method documentation with examples
- User Guide: Detailed tutorials and best practices
- CLI Reference: Command-line usage and automation examples
We welcome contributions! Please see our contributing guidelines:
- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
git clone https://github.com/bumatic/bitchute-scraper.git
cd bitchute-scraper
pip install -e .[dev]
pytestMIT License - see LICENSE file for details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
This software is intended for educational and research purposes only. Users are responsible for complying with Terms of Service and all applicable laws. The software authors disclaim all liability for any misuse of this software.
- Content-based deduplication system on the basis of a persistent download database
- Comprehensive statistics and monitoring
- Advanced token debugging tools
- Fast API-based data collection
- Automatic media downloads
- Concurrent processing
- Multiple export formats
- Command-line interface