From 1f57bd2b232dd7d8e1d0f8f2b068c0482ed993f4 Mon Sep 17 00:00:00 2001 From: Yoshiko <42309414+yoshiko2@users.noreply.github.com> Date: Fri, 27 Mar 2020 21:12:17 +0800 Subject: [PATCH] Update 2.9 --- ADC_function.py | 59 ++++++++++++++++++++++++++----------------------- mgstage.py | 4 ++-- 2 files changed, 33 insertions(+), 30 deletions(-) diff --git a/ADC_function.py b/ADC_function.py index 2bccc67..1ea36cb 100755 --- a/ADC_function.py +++ b/ADC_function.py @@ -24,34 +24,37 @@ if os.path.exists(config_file): else: print('[+]config.ini: not found, creating...',end='') with open("config.ini", "wt", encoding='UTF-8') as code: - print("[common]", file=code) - print("main_mode = 1", file=code) - print("failed_output_folder = failed", file=code) - print("success_output_folder = JAV_output", file=code) - print("", file=code) - print("[proxy]",file=code) - print("proxy=127.0.0.1:1081",file=code) - print("timeout=10", file=code) - print("retry=3", file=code) - print("", file=code) - print("[Name_Rule]", file=code) - print("location_rule=actor+'/'+number",file=code) - print("naming_rule=number+'-'+title",file=code) - print("", file=code) - print("[update]",file=code) - print("update_check=1",file=code) - print("", file=code) - print("[media]", file=code) - print("media_warehouse=emby", file=code) - print("#emby plex kodi", file=code) - print("", file=code) - print("[escape]", file=code) - print("literals=\\", file=code) - print("", file=code) - print("[movie_location]", file=code) - print("path=", file=code) - print("", file=code) - print('.',end='') + file_text = """[common] +main_mode=1 +failed_output_folder=failed +success_output_folder=JAV_output +soft_link=0 + +[proxy] +proxy=192.168.2.2:1080 +timeout=10 +retry=3 + +[Name_Rule] +location_rule=actor+'/'+number +naming_rule=number+'-'+title + +[update] +update_check=1 + +[media] +media_warehouse=emby +#emby or plex or kodi ,emby=jellyfin + +[escape] +literals=\()/ +folders=failed,JAV_output + +[debug_mode] +switch=0 + +""" + print(file_text, file=code) time.sleep(2) print('.') print('[+]config.ini: created!') diff --git a/mgstage.py b/mgstage.py index 76665ab..8de671d 100755 --- a/mgstage.py +++ b/mgstage.py @@ -85,7 +85,7 @@ def main(number2): soup = BeautifulSoup(htmlcode, 'lxml') a = str(soup.find(attrs={'class': 'detail_data'})).replace('\n ','').replace(' ','').replace('\n ','').replace('\n ','') b = str(soup.find(attrs={'id': 'introduction'})).replace('\n ','').replace(' ','').replace('\n ','').replace('\n ','') - print(b) + #print(b) dic = { 'title': getTitle(htmlcode).replace("\\n",'').replace(' ',''), 'studio': getStudio(a), @@ -108,4 +108,4 @@ def main(number2): return js #print(htmlcode) -print(main('SIRO-3607')) +#print(main('SIRO-3607'))