Fix some bugs:
This commit is contained in:
@@ -67,8 +67,6 @@ def get_html(url, cookies: dict = None, ua: str = None, return_type: str = None)
|
|||||||
except requests.exceptions.ConnectionError:
|
except requests.exceptions.ConnectionError:
|
||||||
print("[-]Connect retry {}/{}".format(i + 1, retry_count))
|
print("[-]Connect retry {}/{}".format(i + 1, retry_count))
|
||||||
print('[-]Connect Failed! Please check your Proxy or Network!')
|
print('[-]Connect Failed! Please check your Proxy or Network!')
|
||||||
input("Press ENTER to exit!")
|
|
||||||
exit()
|
|
||||||
|
|
||||||
|
|
||||||
def post_html(url: str, query: dict) -> requests.Response:
|
def post_html(url: str, query: dict) -> requests.Response:
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ transalte_to_sc=1
|
|||||||
;proxytype: http or socks5 or socks5h
|
;proxytype: http or socks5 or socks5h
|
||||||
type=http
|
type=http
|
||||||
proxy=127.0.0.1:1080
|
proxy=127.0.0.1:1080
|
||||||
timeout=10
|
timeout=5
|
||||||
retry=3
|
retry=3
|
||||||
|
|
||||||
[Name_Rule]
|
[Name_Rule]
|
||||||
@@ -23,7 +23,7 @@ max_title_len= 50
|
|||||||
update_check=1
|
update_check=1
|
||||||
|
|
||||||
[priority]
|
[priority]
|
||||||
website=javbus,javdb,fanza,xcity,mgstage,fc2,avsox,jav321,javlib,dlsite
|
website=javdb,javbus,fanza,xcity,mgstage,fc2,avsox,jav321,javlib,dlsite
|
||||||
|
|
||||||
[escape]
|
[escape]
|
||||||
literals=\()/
|
literals=\()/
|
||||||
|
|||||||
28
core.py
28
core.py
@@ -68,25 +68,25 @@ def get_data_from_json(file_number, filepath, conf: config.Config): # 从JSON
|
|||||||
if "avsox" in sources and (re.match(r"^\d{5,}", file_number) or
|
if "avsox" in sources and (re.match(r"^\d{5,}", file_number) or
|
||||||
"HEYZO" in file_number or "heyzo" in file_number or "Heyzo" in file_number
|
"HEYZO" in file_number or "heyzo" in file_number or "Heyzo" in file_number
|
||||||
):
|
):
|
||||||
if conf.debug() == True:
|
# if conf.debug() == True:
|
||||||
print('[+]select avsox')
|
# print('[+]select avsox')
|
||||||
sources.insert(0, sources.pop(sources.index("avsox")))
|
sources.insert(0, sources.pop(sources.index("avsox")))
|
||||||
elif "fanza" in sources and (re.match(r"\d+\D+", file_number) or
|
elif "mgstage" in sources and (re.match(r"\d+\D+", file_number) or
|
||||||
"siro" in file_number or "SIRO" in file_number or "Siro" in file_number
|
"siro" in file_number or "SIRO" in file_number or "Siro" in file_number
|
||||||
):
|
):
|
||||||
if conf.debug() == True:
|
# if conf.debug() == True:
|
||||||
print('[+]select fanza')
|
# print('[+]select fanza')
|
||||||
sources.insert(0, sources.pop(sources.index("fanza")))
|
sources.insert(0, sources.pop(sources.index("mgstage")))
|
||||||
elif "fc2" in sources and ("fc2" in file_number or "FC2" in file_number
|
elif "fc2" in sources and ("fc2" in file_number or "FC2" in file_number
|
||||||
):
|
):
|
||||||
if conf.debug() == True:
|
# if conf.debug() == True:
|
||||||
print('[+]select fc2')
|
# print('[+]select fc2')
|
||||||
sources.insert(0, sources.pop(sources.index("fc2")))
|
sources.insert(0, sources.pop(sources.index("fc2")))
|
||||||
elif "dlsite" in sources and (
|
elif "dlsite" in sources and (
|
||||||
"RJ" in file_number or "rj" in file_number or "VJ" in file_number or "vj" in file_number
|
"RJ" in file_number or "rj" in file_number or "VJ" in file_number or "vj" in file_number
|
||||||
):
|
):
|
||||||
if conf.debug() == True:
|
# if conf.debug() == True:
|
||||||
print('[+]select dlsite')
|
# print('[+]select dlsite')
|
||||||
sources.insert(0, sources.pop(sources.index("dlsite")))
|
sources.insert(0, sources.pop(sources.index("dlsite")))
|
||||||
|
|
||||||
json_data = {}
|
json_data = {}
|
||||||
@@ -486,7 +486,13 @@ def get_part(filepath, failed_folder):
|
|||||||
def debug_print(data: json):
|
def debug_print(data: json):
|
||||||
try:
|
try:
|
||||||
print("[+] ---Debug info---")
|
print("[+] ---Debug info---")
|
||||||
|
for i, v in data.items():
|
||||||
|
if i == 'outline':
|
||||||
|
print('[+] -', i, ' :', len(v), 'characters')
|
||||||
|
continue
|
||||||
|
if i == 'actor_photo' or i == 'year':
|
||||||
|
continue
|
||||||
|
print('[+] -', "%-11s" % i, ':', v)
|
||||||
|
|
||||||
print("[+] ---Debug info---")
|
print("[+] ---Debug info---")
|
||||||
except:
|
except:
|
||||||
|
|||||||
Reference in New Issue
Block a user