fix Ocr Host
This commit is contained in:
@ -157,6 +157,8 @@ class Settings(BaseSettings):
|
|||||||
COOKIECLOUD_PASSWORD: str = None
|
COOKIECLOUD_PASSWORD: str = None
|
||||||
# CookieCloud同步间隔(分钟)
|
# CookieCloud同步间隔(分钟)
|
||||||
COOKIECLOUD_INTERVAL: int = 60 * 24
|
COOKIECLOUD_INTERVAL: int = 60 * 24
|
||||||
|
# OCR服务器地址
|
||||||
|
OCR_HOST: str = "https://movie-pilot.org"
|
||||||
# CookieCloud对应的浏览器UA
|
# CookieCloud对应的浏览器UA
|
||||||
USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.57"
|
USER_AGENT = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.57"
|
||||||
# 媒体库目录
|
# 媒体库目录
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import base64
|
import base64
|
||||||
|
|
||||||
|
from app.core.config import settings
|
||||||
from app.utils.http import RequestUtils
|
from app.utils.http import RequestUtils
|
||||||
|
|
||||||
|
|
||||||
class OcrHelper:
|
class OcrHelper:
|
||||||
|
|
||||||
_ocr_b64_url = "https://movie-pilot.org/captcha/base64"
|
_ocr_b64_url = f"{settings.OCR_HOST}/captcha/base64"
|
||||||
|
|
||||||
def get_captcha_text(self, image_url=None, image_b64=None, cookie=None, ua=None):
|
def get_captcha_text(self, image_url=None, image_b64=None, cookie=None, ua=None):
|
||||||
"""
|
"""
|
||||||
|
Reference in New Issue
Block a user