Spaces:
Runtime error
Runtime error
fikird
commited on
Commit
·
15a525a
1
Parent(s):
683aca2
Update OSINTEngine to integrate with external implementation
Browse files- search_engine.py +10 -11
search_engine.py
CHANGED
|
@@ -63,32 +63,31 @@ class ContentProcessor:
|
|
| 63 |
class OSINTEngine:
|
| 64 |
"""Main OSINT engine class"""
|
| 65 |
def __init__(self):
|
| 66 |
-
|
|
|
|
| 67 |
|
| 68 |
async def search_username(self, query: str) -> Dict[str, Any]:
|
| 69 |
"""Search for usernames"""
|
| 70 |
-
|
| 71 |
-
pass
|
| 72 |
|
| 73 |
async def search_image(self, query: str) -> Dict[str, Any]:
|
| 74 |
"""Search for images"""
|
| 75 |
-
|
| 76 |
-
pass
|
| 77 |
|
| 78 |
async def search_social_media(self, query: str, platform: str) -> Dict[str, Any]:
|
| 79 |
"""Search for social media profiles"""
|
| 80 |
-
|
| 81 |
-
|
|
|
|
|
|
|
| 82 |
|
| 83 |
async def gather_personal_info(self, kwargs: Dict[str, Any]) -> Dict[str, Any]:
|
| 84 |
"""Gather personal information"""
|
| 85 |
-
|
| 86 |
-
pass
|
| 87 |
|
| 88 |
async def search_historical_data(self, query: str) -> Dict[str, Any]:
|
| 89 |
"""Search for historical data"""
|
| 90 |
-
|
| 91 |
-
pass
|
| 92 |
|
| 93 |
class WebSearchEngine:
|
| 94 |
"""Main search engine class"""
|
|
|
|
| 63 |
class OSINTEngine:
|
| 64 |
"""Main OSINT engine class"""
|
| 65 |
def __init__(self):
|
| 66 |
+
from osint_engine import OSINTEngine as ExternalOSINT
|
| 67 |
+
self.engine = ExternalOSINT()
|
| 68 |
|
| 69 |
async def search_username(self, query: str) -> Dict[str, Any]:
|
| 70 |
"""Search for usernames"""
|
| 71 |
+
return await self.engine.search_username(query)
|
|
|
|
| 72 |
|
| 73 |
async def search_image(self, query: str) -> Dict[str, Any]:
|
| 74 |
"""Search for images"""
|
| 75 |
+
return await self.engine.search_image(query)
|
|
|
|
| 76 |
|
| 77 |
async def search_social_media(self, query: str, platform: str) -> Dict[str, Any]:
|
| 78 |
"""Search for social media profiles"""
|
| 79 |
+
results = await self.engine.search_username(query)
|
| 80 |
+
if platform:
|
| 81 |
+
return {platform: [r for r in results.get('platforms', []) if r['platform'].lower() == platform.lower()]}
|
| 82 |
+
return results
|
| 83 |
|
| 84 |
async def gather_personal_info(self, kwargs: Dict[str, Any]) -> Dict[str, Any]:
|
| 85 |
"""Gather personal information"""
|
| 86 |
+
return await self.engine.gather_personal_info(kwargs)
|
|
|
|
| 87 |
|
| 88 |
async def search_historical_data(self, query: str) -> Dict[str, Any]:
|
| 89 |
"""Search for historical data"""
|
| 90 |
+
return await self.engine.search_historical_data(query)
|
|
|
|
| 91 |
|
| 92 |
class WebSearchEngine:
|
| 93 |
"""Main search engine class"""
|