Remove javlib source
This commit is contained in:
@@ -108,32 +108,32 @@ def post_html(url: str, query: dict, headers: dict = None) -> requests.Response:
|
||||
print("[-]" + errors)
|
||||
|
||||
|
||||
def get_javlib_cookie() -> [dict, str]:
|
||||
import cloudscraper
|
||||
switch, proxy, timeout, retry_count, proxytype = config.Config().proxy()
|
||||
proxies = get_proxy(proxy, proxytype)
|
||||
|
||||
raw_cookie = {}
|
||||
user_agent = ""
|
||||
|
||||
# Get __cfduid/cf_clearance and user-agent
|
||||
for i in range(retry_count):
|
||||
try:
|
||||
if switch == 1 or switch == '1':
|
||||
raw_cookie, user_agent = cloudscraper.get_cookie_string(
|
||||
"http://www.javlibrary.com/",
|
||||
proxies=proxies
|
||||
)
|
||||
else:
|
||||
raw_cookie, user_agent = cloudscraper.get_cookie_string(
|
||||
"http://www.javlibrary.com/"
|
||||
)
|
||||
except requests.exceptions.ProxyError:
|
||||
print("[-] ProxyError, retry {}/{}".format(i + 1, retry_count))
|
||||
except cloudscraper.exceptions.CloudflareIUAMError:
|
||||
print("[-] IUAMError, retry {}/{}".format(i + 1, retry_count))
|
||||
|
||||
return raw_cookie, user_agent
|
||||
# def get_javlib_cookie() -> [dict, str]:
|
||||
# import cloudscraper
|
||||
# switch, proxy, timeout, retry_count, proxytype = config.Config().proxy()
|
||||
# proxies = get_proxy(proxy, proxytype)
|
||||
#
|
||||
# raw_cookie = {}
|
||||
# user_agent = ""
|
||||
#
|
||||
# # Get __cfduid/cf_clearance and user-agent
|
||||
# for i in range(retry_count):
|
||||
# try:
|
||||
# if switch == 1 or switch == '1':
|
||||
# raw_cookie, user_agent = cloudscraper.get_cookie_string(
|
||||
# "http://www.javlibrary.com/",
|
||||
# proxies=proxies
|
||||
# )
|
||||
# else:
|
||||
# raw_cookie, user_agent = cloudscraper.get_cookie_string(
|
||||
# "http://www.javlibrary.com/"
|
||||
# )
|
||||
# except requests.exceptions.ProxyError:
|
||||
# print("[-] ProxyError, retry {}/{}".format(i + 1, retry_count))
|
||||
# except cloudscraper.exceptions.CloudflareIUAMError:
|
||||
# print("[-] IUAMError, retry {}/{}".format(i + 1, retry_count))
|
||||
#
|
||||
# return raw_cookie, user_agent
|
||||
|
||||
|
||||
def translateTag_to_sc(tag):
|
||||
|
||||
@@ -134,7 +134,7 @@ def create_data_and_move_with_custom_number(file_path: str, c: config.Config, cu
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
version = '4.6.1'
|
||||
version = '4.6.2'
|
||||
|
||||
# Parse command line args
|
||||
single_file_path, folder_path, config_file, custom_number, auto_exit = argparse_function(version)
|
||||
@@ -155,6 +155,7 @@ if __name__ == '__main__':
|
||||
print('[!]Enable soft link')
|
||||
|
||||
create_failed_folder(conf.failed_folder())
|
||||
start_time = time.time()
|
||||
|
||||
if not single_file_path == '': #Single File
|
||||
print('[+]==================== Single File =====================')
|
||||
@@ -169,8 +170,6 @@ if __name__ == '__main__':
|
||||
count_all = str(len(movie_list))
|
||||
print('[+]Find', count_all, 'movies')
|
||||
|
||||
start_time = time.time()
|
||||
|
||||
for movie_path in movie_list: # 遍历电影列表 交给core处理
|
||||
count = count + 1
|
||||
percentage = str(count / int(count_all) * 100)[:4] + '%'
|
||||
|
||||
@@ -26,7 +26,7 @@ max_title_len= 50
|
||||
update_check=1
|
||||
|
||||
[priority]
|
||||
website=javbus,javdb,airav,fanza,xcity,mgstage,fc2,avsox,jav321,javlib,dlsite
|
||||
website=javbus,javdb,airav,fanza,xcity,mgstage,fc2,avsox,jav321,dlsite
|
||||
|
||||
[escape]
|
||||
literals=\()/
|
||||
|
||||
6
core.py
6
core.py
@@ -21,7 +21,7 @@ from WebCrawler import javbus
|
||||
from WebCrawler import javdb
|
||||
from WebCrawler import mgstage
|
||||
from WebCrawler import xcity
|
||||
from WebCrawler import javlib
|
||||
# from WebCrawler import javlib
|
||||
from WebCrawler import dlsite
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ def get_data_from_json(file_number, filepath, conf: config.Config): # 从JSON
|
||||
"mgstage": mgstage.main,
|
||||
"jav321": jav321.main,
|
||||
"xcity": xcity.main,
|
||||
"javlib": javlib.main,
|
||||
# "javlib": javlib.main,
|
||||
"dlsite": dlsite.main,
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ def get_data_from_json(file_number, filepath, conf: config.Config): # 从JSON
|
||||
'javdb' : pool.apply_async(javbus.main, (file_number,)),
|
||||
'mgstage' : pool.apply_async(mgstage.main, (file_number,)),
|
||||
'xcity' : pool.apply_async(xcity.main, (file_number,)),
|
||||
'javlib' : pool.apply_async(javlib.main, (file_number,)),
|
||||
# 'javlib' : pool.apply_async(javlib.main, (file_number,)),
|
||||
'dlsite' : pool.apply_async(dlsite.main, (file_number,)),
|
||||
'airav' : pool.apply_async(airav.main, (file_number,)),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user