Simply message output
This commit is contained in:
@@ -100,7 +100,6 @@ def cutImage(imagecut, path, fanart_path, poster_path, skip_facerec=False):
|
|||||||
|
|
||||||
|
|
||||||
def face_center(filename, model):
|
def face_center(filename, model):
|
||||||
print('[+]Use model ' + model)
|
|
||||||
try:
|
try:
|
||||||
mod = importlib.import_module('.' + model, 'ImageProcessing')
|
mod = importlib.import_module('.' + model, 'ImageProcessing')
|
||||||
return mod.face_center(filename, model)
|
return mod.face_center(filename, model)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import face_recognition
|
|||||||
def face_center(filename, model):
|
def face_center(filename, model):
|
||||||
image = face_recognition.load_image_file(filename)
|
image = face_recognition.load_image_file(filename)
|
||||||
face_locations = face_recognition.face_locations(image, 1, model)
|
face_locations = face_recognition.face_locations(image, 1, model)
|
||||||
print('[+]Found person ' + str(len(face_locations)))
|
print('[+]Found person [' + str(len(face_locations)) + '] By model hog')
|
||||||
maxRight = 0
|
maxRight = 0
|
||||||
maxTop = 0
|
maxTop = 0
|
||||||
for face_location in face_locations:
|
for face_location in face_locations:
|
||||||
|
|||||||
3
core.py
3
core.py
@@ -473,9 +473,8 @@ def add_mark(poster_path, thumb_path, cn_sub, leak, uncensored, hack) -> None:
|
|||||||
if mark_type == '':
|
if mark_type == '':
|
||||||
return
|
return
|
||||||
add_mark_thread(thumb_path, cn_sub, leak, uncensored, hack)
|
add_mark_thread(thumb_path, cn_sub, leak, uncensored, hack)
|
||||||
print('[+]Thumb Add Mark: ' + mark_type.strip(','))
|
|
||||||
add_mark_thread(poster_path, cn_sub, leak, uncensored, hack)
|
add_mark_thread(poster_path, cn_sub, leak, uncensored, hack)
|
||||||
print('[+]Poster Add Mark: ' + mark_type.strip(','))
|
print('[+]Add Mark: ' + mark_type.strip(','))
|
||||||
|
|
||||||
|
|
||||||
def add_mark_thread(pic_path, cn_sub, leak, uncensored, hack):
|
def add_mark_thread(pic_path, cn_sub, leak, uncensored, hack):
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ from requests.adapters import HTTPAdapter
|
|||||||
from urllib3.util.retry import Retry
|
from urllib3.util.retry import Retry
|
||||||
from cloudscraper import create_scraper
|
from cloudscraper import create_scraper
|
||||||
|
|
||||||
|
import config
|
||||||
|
|
||||||
G_USER_AGENT = r'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.133 Safari/537.36'
|
G_USER_AGENT = r'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.133 Safari/537.36'
|
||||||
G_DEFAULT_TIMEOUT = 10
|
G_DEFAULT_TIMEOUT = 10
|
||||||
|
|
||||||
@@ -33,8 +35,10 @@ def get(url: str, cookies=None, ua: str=None, extra_headers=None, return_type: s
|
|||||||
result.encoding = encoding or result.apparent_encoding
|
result.encoding = encoding or result.apparent_encoding
|
||||||
return result.text
|
return result.text
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
if config.getInstance().debug():
|
||||||
print(f"[-]Connect: {url} retry {i + 1}/{retry}")
|
print(f"[-]Connect: {url} retry {i + 1}/{retry}")
|
||||||
errors = str(e)
|
errors = str(e)
|
||||||
|
if config.getInstance().debug():
|
||||||
if "getaddrinfo failed" in errors:
|
if "getaddrinfo failed" in errors:
|
||||||
print("[-]Connect Failed! Please Check your proxy config")
|
print("[-]Connect Failed! Please Check your proxy config")
|
||||||
print("[-]" + errors)
|
print("[-]" + errors)
|
||||||
@@ -64,8 +68,10 @@ def post(url: str, data: dict=None, files=None, cookies=None, ua: str=None, retu
|
|||||||
result.encoding = encoding or result.apparent_encoding
|
result.encoding = encoding or result.apparent_encoding
|
||||||
return result
|
return result
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
if config.getInstance().debug():
|
||||||
print(f"[-]Connect: {url} retry {i + 1}/{retry}")
|
print(f"[-]Connect: {url} retry {i + 1}/{retry}")
|
||||||
errors = str(e)
|
errors = str(e)
|
||||||
|
if config.getInstance().debug():
|
||||||
if "getaddrinfo failed" in errors:
|
if "getaddrinfo failed" in errors:
|
||||||
print("[-]Connect Failed! Please Check your proxy config")
|
print("[-]Connect Failed! Please Check your proxy config")
|
||||||
print("[-]" + errors)
|
print("[-]" + errors)
|
||||||
|
|||||||
Reference in New Issue
Block a user