chat-backend/venv/lib/python3.12/site-packages/firecrawl/v2/utils/get_version.py
Django Template a0fce0b484 Initial commit: Django chat backend with enhanced web scraping
Features:
- Django REST API backend
- Multi-strategy web scraping system (Beautiful Soup, Playwright, Firecrawl)
- Anti-detection features (proxy rotation, user-agent rotation)
- Data export functionality (JSON, CSV, TXT)
- Business and CrawledPage models
- Enhanced crawling service with fallback mechanisms

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-21 11:01:50 +05:30

15 lines
492 B
Python

import os
import re
from pathlib import Path
def get_version():
try:
package_path = Path(__file__).parents[2]
version_file = (package_path / "__init__.py").read_text()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
if version_match:
return version_match.group(1).strip()
return "3.x.x"
except Exception as e:
print(f"Failed to get version from __init__.py: {e}")
return "3.x.x"