face-intel / cores /search /__init__.py
Marwan
Restructure + add reverse face search (PimEyes-style)
f5eeb1c
Raw
History Blame Contribute Delete
801 Bytes
"""
Search Core — shared scraping + reverse-image-search helpers.
Consolidates:
- HTTP session management (shared requests.Session with retries)
- Image-URL extraction from HTML (BeautifulSoup-free; stdlib html.parser)
- User-agent management
- URL normalization
Replaces the duplicated requests session code in utils/http.py and the
BeautifulSoup dependency for simple image scraping.
"""
from cores.search.http import shared_session, fetch_html, fetch_bytes, fetch_json
from cores.search.images import extract_image_urls_from_html, is_social_media_url
from cores.search.user_agent import random_user_agent
__all__ = [
"shared_session",
"fetch_html",
"fetch_bytes",
"fetch_json",
"extract_image_urls_from_html",
"is_social_media_url",
"random_user_agent",
]