mirror of
https://github.com/thecyberlearn/chat-backend.git
synced 2026-08-18 20:52:53 +00:00
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>
15 lines
492 B
Python
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" |