0.10 Beta10 Update
This commit is contained in:
parent
dddaf5c74f
commit
e91b7a85bf
@ -12,33 +12,24 @@ else:
|
|||||||
|
|
||||||
def get_html(url):#网页请求核心
|
def get_html(url):#网页请求核心
|
||||||
if not str(config['proxy']['proxy']) == '':
|
if not str(config['proxy']['proxy']) == '':
|
||||||
|
proxies = {
|
||||||
|
"http" : "http://" + str(config['proxy']['proxy']),
|
||||||
|
"https": "https://" + str(config['proxy']['proxy'])
|
||||||
|
}
|
||||||
|
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3100.0 Safari/537.36'}
|
||||||
|
getweb = requests.get(str(url), headers=headers, proxies=proxies)
|
||||||
|
getweb.encoding = 'utf-8'
|
||||||
|
# print(getweb.text)
|
||||||
try:
|
try:
|
||||||
proxies = {"http": "http://" + str(config['proxy']['proxy']),
|
return getweb.text
|
||||||
"https": "https://" + str(config['proxy']['proxy'])}
|
|
||||||
headers = {
|
|
||||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3100.0 Safari/537.36'}
|
|
||||||
getweb = requests.get(str(url), timeout=10, headers=headers, proxies=proxies)
|
|
||||||
getweb.encoding = 'utf-8'
|
|
||||||
# print(getweb.text)
|
|
||||||
try:
|
|
||||||
return getweb.text
|
|
||||||
except:
|
|
||||||
print('[-]Connected failed!:Proxy error')
|
|
||||||
except:
|
except:
|
||||||
aaaa=''
|
print('[-]Connected failed!:Proxy error')
|
||||||
#print('[-]Connect Failed.')
|
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
headers = {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'}
|
||||||
|
getweb = requests.get(str(url), headers=headers)
|
||||||
|
getweb.encoding = 'utf-8'
|
||||||
try:
|
try:
|
||||||
headers = {
|
return getweb.text
|
||||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'}
|
|
||||||
getweb = requests.get(str(url), timeout=10, headers=headers)
|
|
||||||
getweb.encoding = 'utf-8'
|
|
||||||
try:
|
|
||||||
return getweb.text
|
|
||||||
except:
|
|
||||||
print("[-]Connect Failed.")
|
|
||||||
except:
|
except:
|
||||||
aaaa = ''
|
print("[-]Connect Failed.")
|
||||||
#print('[-]Connect Failed.')
|
|
263
core.py
263
core.py
@ -18,109 +18,15 @@ year=''
|
|||||||
outline=''
|
outline=''
|
||||||
runtime=''
|
runtime=''
|
||||||
director=''
|
director=''
|
||||||
actor=[]
|
actor_list=[]
|
||||||
|
actor=''
|
||||||
release=''
|
release=''
|
||||||
number=''
|
number=''
|
||||||
cover=''
|
cover=''
|
||||||
imagecut=''
|
imagecut=''
|
||||||
tag=[]
|
tag=[]
|
||||||
|
naming_rule =''#eval(config['Name_Rule']['naming_rule'])
|
||||||
#=====================资源下载部分===========================
|
location_rule=''#eval(config['Name_Rule']['location_rule'])
|
||||||
def DownloadFileWithFilename(url,filename,path): #path = examle:photo , video.in the Project Folder!
|
|
||||||
config = ConfigParser()
|
|
||||||
config.read('proxy.ini', encoding='UTF-8')
|
|
||||||
proxy = str(config['proxy']['proxy'])
|
|
||||||
|
|
||||||
if not str(config['proxy']['proxy']) == '':
|
|
||||||
try:
|
|
||||||
if not os.path.exists(path):
|
|
||||||
os.makedirs(path)
|
|
||||||
headers = {
|
|
||||||
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'}
|
|
||||||
r = requests.get(url,timeout=10, headers=headers,proxies={"http": "http://" + str(proxy), "https": "https://" + str(proxy)})
|
|
||||||
with open(str(path) + "/" + str(filename), "wb") as code:
|
|
||||||
code.write(r.content)
|
|
||||||
# print(bytes(r),file=code)
|
|
||||||
except IOError as e:
|
|
||||||
print("[-]Movie not found in All website!")
|
|
||||||
print("[-]" + str(filename), e)
|
|
||||||
# print("[*]=====================================")
|
|
||||||
return "failed"
|
|
||||||
except Exception as e1:
|
|
||||||
print(e1)
|
|
||||||
print("[-]Download Failed2!")
|
|
||||||
time.sleep(3)
|
|
||||||
os._exit(0)
|
|
||||||
else:
|
|
||||||
try:
|
|
||||||
if not os.path.exists(path):
|
|
||||||
os.makedirs(path)
|
|
||||||
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'}
|
|
||||||
r = requests.get(url,timeout=10, headers=headers)
|
|
||||||
with open(str(path) + "/" + str(filename), "wb") as code:
|
|
||||||
code.write(r.content)
|
|
||||||
# print(bytes(r),file=code)
|
|
||||||
except IOError as e:
|
|
||||||
print("[-]Movie not found in All website!")
|
|
||||||
print("[-]" + str(filename), e)
|
|
||||||
# print("[*]=====================================")
|
|
||||||
return "failed"
|
|
||||||
except Exception as e1:
|
|
||||||
print(e1)
|
|
||||||
print("[-]Download Failed2!")
|
|
||||||
time.sleep(3)
|
|
||||||
os._exit(0)
|
|
||||||
def PrintFiles(path):
|
|
||||||
try:
|
|
||||||
if not os.path.exists(path):
|
|
||||||
os.makedirs(path)
|
|
||||||
with open(path + "/" + number + ".nfo", "wt", encoding='UTF-8') as code:
|
|
||||||
print("<movie>", file=code)
|
|
||||||
print(" <title>" + title + "</title>", file=code)
|
|
||||||
print(" <set>", file=code)
|
|
||||||
print(" </set>", file=code)
|
|
||||||
print(" <studio>" + studio + "+</studio>", file=code)
|
|
||||||
print(" <year>" + year + "</year>", file=code)
|
|
||||||
print(" <outline>"+outline+"</outline>", file=code)
|
|
||||||
print(" <plot>"+outline+"</plot>", file=code)
|
|
||||||
print(" <runtime>"+str(runtime).replace(" ","")+"</runtime>", file=code)
|
|
||||||
print(" <director>" + director + "</director>", file=code)
|
|
||||||
print(" <poster>" + number + ".png</poster>", file=code)
|
|
||||||
print(" <thumb>" + number + ".png</thumb>", file=code)
|
|
||||||
print(" <fanart>"+number + '.jpg'+"</fanart>", file=code)
|
|
||||||
try:
|
|
||||||
for u in actor:
|
|
||||||
print(" <actor>", file=code)
|
|
||||||
print(" <name>" + u + "</name>", file=code)
|
|
||||||
print(" </actor>", file=code)
|
|
||||||
except:
|
|
||||||
aaaa=''
|
|
||||||
print(" <maker>" + studio + "</maker>", file=code)
|
|
||||||
print(" <label>", file=code)
|
|
||||||
print(" </label>", file=code)
|
|
||||||
try:
|
|
||||||
for i in tag:
|
|
||||||
print(" <tag>" + i + "</tag>", file=code)
|
|
||||||
except:
|
|
||||||
aaaaa=''
|
|
||||||
try:
|
|
||||||
for i in tag:
|
|
||||||
print(" <genre>" + i + "</genre>", file=code)
|
|
||||||
except:
|
|
||||||
aaaaaaaa=''
|
|
||||||
print(" <num>" + number + "</num>", file=code)
|
|
||||||
print(" <release>" + release + "</release>", file=code)
|
|
||||||
print(" <cover>"+cover+"</cover>", file=code)
|
|
||||||
print(" <website>" + "https://www.javbus.com/"+number + "</website>", file=code)
|
|
||||||
print("</movie>", file=code)
|
|
||||||
print("[+]Writeed! "+path + "/" + number + ".nfo")
|
|
||||||
except IOError as e:
|
|
||||||
print("[-]Write Failed!")
|
|
||||||
print(e)
|
|
||||||
except Exception as e1:
|
|
||||||
print(e1)
|
|
||||||
print("[-]Write Failed!")
|
|
||||||
|
|
||||||
#=====================本地文件处理===========================
|
#=====================本地文件处理===========================
|
||||||
def argparse_get_file():
|
def argparse_get_file():
|
||||||
import argparse
|
import argparse
|
||||||
@ -135,7 +41,6 @@ def CreatFailedFolder():
|
|||||||
except:
|
except:
|
||||||
print("[-]failed!can not be make folder 'failed'\n[-](Please run as Administrator)")
|
print("[-]failed!can not be make folder 'failed'\n[-](Please run as Administrator)")
|
||||||
os._exit(0)
|
os._exit(0)
|
||||||
|
|
||||||
def getNumberFromFilename(filepath):
|
def getNumberFromFilename(filepath):
|
||||||
global title
|
global title
|
||||||
global studio
|
global studio
|
||||||
@ -143,6 +48,7 @@ def getNumberFromFilename(filepath):
|
|||||||
global outline
|
global outline
|
||||||
global runtime
|
global runtime
|
||||||
global director
|
global director
|
||||||
|
global actor_list
|
||||||
global actor
|
global actor
|
||||||
global release
|
global release
|
||||||
global number
|
global number
|
||||||
@ -150,6 +56,9 @@ def getNumberFromFilename(filepath):
|
|||||||
global imagecut
|
global imagecut
|
||||||
global tag
|
global tag
|
||||||
|
|
||||||
|
global naming_rule
|
||||||
|
global location_rule
|
||||||
|
|
||||||
#================================================获取文件番号================================================
|
#================================================获取文件番号================================================
|
||||||
try: #试图提取番号
|
try: #试图提取番号
|
||||||
# ====番号获取主程序====
|
# ====番号获取主程序====
|
||||||
@ -170,7 +79,7 @@ def getNumberFromFilename(filepath):
|
|||||||
if not re.search('\w-', file_number).group() == 'None':
|
if not re.search('\w-', file_number).group() == 'None':
|
||||||
file_number = re.search('\w+-\w+', filename).group()
|
file_number = re.search('\w+-\w+', filename).group()
|
||||||
#上面是插入减号-到番号中
|
#上面是插入减号-到番号中
|
||||||
print("[!]Making Data for [" + filename + "],the number is [" + file_number + "]")
|
print("[!]Making Data for [" + filename + "],the number is [" + file_number + "]")
|
||||||
# ====番号获取主程序=结束===
|
# ====番号获取主程序=结束===
|
||||||
except Exception as e: #番号提取异常
|
except Exception as e: #番号提取异常
|
||||||
print('[-]'+str(os.path.basename(filepath))+' Cannot catch the number :')
|
print('[-]'+str(os.path.basename(filepath))+' Cannot catch the number :')
|
||||||
@ -235,20 +144,22 @@ def getNumberFromFilename(filepath):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
title = json_data['title']
|
title = json_data['title']
|
||||||
studio = json_data['studio']
|
studio = json_data['studio']
|
||||||
year = json_data['year']
|
year = json_data['year']
|
||||||
outline = json_data['outline']
|
outline = json_data['outline']
|
||||||
runtime = json_data['runtime']
|
runtime = json_data['runtime']
|
||||||
director = json_data['director']
|
director = json_data['director']
|
||||||
actor = str(json_data['actor']).strip("[ ]").replace("'",'').replace(" ",'').split(',') #字符串转列表
|
actor_list= str(json_data['actor']).strip("[ ]").replace("'",'').replace(" ",'').split(',') #字符串转列表
|
||||||
release = json_data['release']
|
release = json_data['release']
|
||||||
number = json_data['number']
|
number = json_data['number']
|
||||||
cover = json_data['cover']
|
cover = json_data['cover']
|
||||||
imagecut = json_data['imagecut']
|
imagecut = json_data['imagecut']
|
||||||
tag = str(json_data['tag']).strip("[ ]").replace("'",'').replace(" ",'').split(',') #字符串转列表
|
tag = str(json_data['tag']).strip("[ ]").replace("'",'').replace(" ",'').split(',') #字符串转列表
|
||||||
|
actor = str(actor_list).strip("[ ]").replace("'",'').replace(" ",'')
|
||||||
|
|
||||||
|
naming_rule = eval(config['Name_Rule']['naming_rule'])
|
||||||
|
location_rule =eval(config['Name_Rule']['location_rule'])
|
||||||
except IOError as e:
|
except IOError as e:
|
||||||
print('[-]'+str(e))
|
print('[-]'+str(e))
|
||||||
print('[-]Move ' + filename + ' to failed folder')
|
print('[-]Move ' + filename + ' to failed folder')
|
||||||
@ -260,47 +171,137 @@ def getNumberFromFilename(filepath):
|
|||||||
print('[-]Move ' + filename + ' to failed folder')
|
print('[-]Move ' + filename + ' to failed folder')
|
||||||
shutil.move(filepath, str(os.getcwd())+'/'+'failed/')
|
shutil.move(filepath, str(os.getcwd())+'/'+'failed/')
|
||||||
os._exit(0)
|
os._exit(0)
|
||||||
|
|
||||||
path = '' #设置path为全局变量,后面移动文件要用
|
path = '' #设置path为全局变量,后面移动文件要用
|
||||||
|
|
||||||
def creatFolder():
|
def creatFolder():
|
||||||
actor2 = str(actor).strip("[ ]").replace("'",'').replace(" ",'')
|
|
||||||
global path
|
global path
|
||||||
if len(actor2) > 240: #新建成功输出文件夹
|
if len(actor) > 240: #新建成功输出文件夹
|
||||||
path = 'JAV_output' + '/' + '超多人' + '/' + number #path为影片+元数据所在目录
|
path = location_rule.replace("'actor'","'超多人'",3).replace("actor","'超多人'",3) #path为影片+元数据所在目录
|
||||||
|
#print(path)
|
||||||
else:
|
else:
|
||||||
path = 'JAV_output' + '/' + str(actor2) + '/' + str(number)
|
path = location_rule
|
||||||
|
#print(path)
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
os.makedirs(path)
|
os.makedirs(path)
|
||||||
path = str(os.getcwd())+'/'+path
|
#=====================资源下载部分===========================
|
||||||
|
def DownloadFileWithFilename(url,filename,path): #path = examle:photo , video.in the Project Folder!
|
||||||
|
config = ConfigParser()
|
||||||
|
config.read('proxy.ini', encoding='UTF-8')
|
||||||
|
proxy = str(config['proxy']['proxy'])
|
||||||
|
if not str(config['proxy']['proxy']) == '':
|
||||||
|
try:
|
||||||
|
if not os.path.exists(path):
|
||||||
|
os.makedirs(path)
|
||||||
|
headers = {
|
||||||
|
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'}
|
||||||
|
r = requests.get(url, headers=headers,proxies={"http": "http://" + str(proxy), "https": "https://" + str(proxy)})
|
||||||
|
with open(str(path) + "/" + filename, "wb") as code:
|
||||||
|
code.write(r.content)
|
||||||
|
# print(bytes(r),file=code)
|
||||||
|
except IOError as e:
|
||||||
|
print("[-]Movie not found in All website!")
|
||||||
|
print("[-]" + filename, e)
|
||||||
|
# print("[*]=====================================")
|
||||||
|
return "failed"
|
||||||
|
except Exception as e1:
|
||||||
|
print(e1)
|
||||||
|
print("[-]Download Failed2!")
|
||||||
|
time.sleep(3)
|
||||||
|
os._exit(0)
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
if not os.path.exists(path):
|
||||||
|
os.makedirs(path)
|
||||||
|
headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36'}
|
||||||
|
r = requests.get(url, headers=headers)
|
||||||
|
with open(str(path) + "/" + filename, "wb") as code:
|
||||||
|
code.write(r.content)
|
||||||
|
# print(bytes(r),file=code)
|
||||||
|
except IOError as e:
|
||||||
|
print("[-]Movie not found in All website!")
|
||||||
|
print("[-]" + filename, e)
|
||||||
|
# print("[*]=====================================")
|
||||||
|
return "failed"
|
||||||
|
except Exception as e1:
|
||||||
|
print(e1)
|
||||||
|
print("[-]Download Failed2!")
|
||||||
|
time.sleep(3)
|
||||||
|
os._exit(0)
|
||||||
|
def PrintFiles(path):
|
||||||
|
try:
|
||||||
|
if not os.path.exists(path):
|
||||||
|
os.makedirs(path)
|
||||||
|
with open(path + "/" + naming_rule + ".nfo", "wt", encoding='UTF-8') as code:
|
||||||
|
print("<movie>", file=code)
|
||||||
|
print(" <title>" + title + "</title>", file=code)
|
||||||
|
print(" <set>", file=code)
|
||||||
|
print(" </set>", file=code)
|
||||||
|
print(" <studio>" + studio + "+</studio>", file=code)
|
||||||
|
print(" <year>" + year + "</year>", file=code)
|
||||||
|
print(" <outline>"+outline+"</outline>", file=code)
|
||||||
|
print(" <plot>"+outline+"</plot>", file=code)
|
||||||
|
print(" <runtime>"+str(runtime).replace(" ","")+"</runtime>", file=code)
|
||||||
|
print(" <director>" + director + "</director>", file=code)
|
||||||
|
print(" <poster>" + naming_rule + ".png</poster>", file=code)
|
||||||
|
print(" <thumb>" + naming_rule + ".png</thumb>", file=code)
|
||||||
|
print(" <fanart>"+naming_rule + '.jpg'+"</fanart>", file=code)
|
||||||
|
try:
|
||||||
|
for u in actor_list:
|
||||||
|
print(" <actor>", file=code)
|
||||||
|
print(" <name>" + u + "</name>", file=code)
|
||||||
|
print(" </actor>", file=code)
|
||||||
|
except:
|
||||||
|
aaaa=''
|
||||||
|
print(" <maker>" + studio + "</maker>", file=code)
|
||||||
|
print(" <label>", file=code)
|
||||||
|
print(" </label>", file=code)
|
||||||
|
try:
|
||||||
|
for i in tag:
|
||||||
|
print(" <tag>" + i + "</tag>", file=code)
|
||||||
|
except:
|
||||||
|
aaaaa=''
|
||||||
|
try:
|
||||||
|
for i in tag:
|
||||||
|
print(" <genre>" + i + "</genre>", file=code)
|
||||||
|
except:
|
||||||
|
aaaaaaaa=''
|
||||||
|
print(" <num>" + number + "</num>", file=code)
|
||||||
|
print(" <release>" + release + "</release>", file=code)
|
||||||
|
print(" <cover>"+cover+"</cover>", file=code)
|
||||||
|
print(" <website>" + "https://www.javbus.com/"+number + "</website>", file=code)
|
||||||
|
print("</movie>", file=code)
|
||||||
|
print("[+]Writeed! "+path + "/" + naming_rule + ".nfo")
|
||||||
|
except IOError as e:
|
||||||
|
print("[-]Write Failed!")
|
||||||
|
print(e)
|
||||||
|
except Exception as e1:
|
||||||
|
print(e1)
|
||||||
|
print("[-]Write Failed!")
|
||||||
def imageDownload(filepath): #封面是否下载成功,否则移动到failed
|
def imageDownload(filepath): #封面是否下载成功,否则移动到failed
|
||||||
if DownloadFileWithFilename(cover,str(number) + '.jpg', path) == 'failed':
|
if DownloadFileWithFilename(cover,naming_rule+ '.jpg', path) == 'failed':
|
||||||
shutil.move(filepath, 'failed/')
|
shutil.move(filepath, 'failed/')
|
||||||
os._exit(0)
|
os._exit(0)
|
||||||
DownloadFileWithFilename(cover, number + '.jpg', path)
|
DownloadFileWithFilename(cover, naming_rule + '.jpg', path)
|
||||||
print('[+]Image Downloaded!', path +'/'+number+'.jpg')
|
print('[+]Image Downloaded!', path +'/'+naming_rule+'.jpg')
|
||||||
def cutImage():
|
def cutImage():
|
||||||
if imagecut == 1:
|
if imagecut == 1:
|
||||||
try:
|
try:
|
||||||
img = Image.open(path + '/' + number + '.jpg')
|
img = Image.open(path + '/' + naming_rule + '.jpg')
|
||||||
imgSize = img.size
|
imgSize = img.size
|
||||||
w = img.width
|
w = img.width
|
||||||
h = img.height
|
h = img.height
|
||||||
img2 = img.crop((w / 1.9, 0, w, h))
|
img2 = img.crop((w / 1.9, 0, w, h))
|
||||||
img2.save(path + '/' + number + '.png')
|
img2.save(path + '/' + naming_rule + '.png')
|
||||||
except:
|
except:
|
||||||
print('[-]Cover cut failed!')
|
print('[-]Cover cut failed!')
|
||||||
else:
|
else:
|
||||||
img = Image.open(path + '/' + number + '.jpg')
|
img = Image.open(path + '/' + naming_rule + '.jpg')
|
||||||
w = img.width
|
w = img.width
|
||||||
h = img.height
|
h = img.height
|
||||||
img.save(path + '/' + number + '.png')
|
img.save(path + '/' + naming_rule + '.png')
|
||||||
|
|
||||||
def pasteFileToFolder(filepath, path): #文件路径,番号,后缀,要移动至的位置
|
def pasteFileToFolder(filepath, path): #文件路径,番号,后缀,要移动至的位置
|
||||||
houzhui = str(re.search('[.](AVI|RMVB|WMV|MOV|MP4|MKV|FLV|avi|rmvb|wmv|mov|mp4|mkv|flv)$', filepath).group())
|
houzhui = str(re.search('[.](AVI|RMVB|WMV|MOV|MP4|MKV|FLV|avi|rmvb|wmv|mov|mp4|mkv|flv)$', filepath).group())
|
||||||
os.rename(filepath, number + houzhui)
|
os.rename(filepath, naming_rule + houzhui)
|
||||||
shutil.move(number + houzhui, path)
|
shutil.move(naming_rule + houzhui, path)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
filepath=argparse_get_file() #影片的路径
|
filepath=argparse_get_file() #影片的路径
|
||||||
|
@ -43,16 +43,18 @@ def main(number):
|
|||||||
dic = {
|
dic = {
|
||||||
'title': getTitle(htmlcode),
|
'title': getTitle(htmlcode),
|
||||||
'studio': getStudio(htmlcode),
|
'studio': getStudio(htmlcode),
|
||||||
'year': getRelease(number),
|
'year': str(re.search('\d{4}',getRelease(number)).group()),
|
||||||
'outline': getOutline(htmlcode,number),
|
'outline': getOutline(htmlcode,number),
|
||||||
'runtime': '',
|
'runtime': '',
|
||||||
'director': getStudio(htmlcode),
|
'director': getStudio(htmlcode),
|
||||||
'actor': '',
|
'actor': '',
|
||||||
'release': getRelease(number),
|
'release': getRelease(number),
|
||||||
'number': number,
|
'number': 'FC2-'+number,
|
||||||
'cover': getCover(htmlcode,number),
|
'cover': getCover(htmlcode,number),
|
||||||
'imagecut': 0,
|
'imagecut': 0,
|
||||||
'tag':" ",
|
'tag':" ",
|
||||||
}
|
}
|
||||||
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'),)#.encode('UTF-8')
|
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'),)#.encode('UTF-8')
|
||||||
return js
|
return js
|
||||||
|
|
||||||
|
#print(main('1104989'))
|
43
javbus.py
43
javbus.py
@ -79,20 +79,41 @@ def main(number):
|
|||||||
htmlcode=get_html('https://www.javbus.com/'+number)
|
htmlcode=get_html('https://www.javbus.com/'+number)
|
||||||
dww_htmlcode=get_html("https://www.dmm.co.jp/mono/dvd/-/detail/=/cid=" + number.replace("-", ''))
|
dww_htmlcode=get_html("https://www.dmm.co.jp/mono/dvd/-/detail/=/cid=" + number.replace("-", ''))
|
||||||
dic = {
|
dic = {
|
||||||
'title': getTitle(htmlcode),
|
'title': getTitle(htmlcode),
|
||||||
'studio': getStudio(htmlcode),
|
'studio': getStudio(htmlcode),
|
||||||
'year': getYear(htmlcode),
|
'year': str(re.search('\d{4}',getYear(htmlcode)).group()),
|
||||||
'outline': getOutline(dww_htmlcode),
|
'outline': getOutline(dww_htmlcode),
|
||||||
'runtime': getRuntime(htmlcode),
|
'runtime': getRuntime(htmlcode),
|
||||||
'director': getDirector(htmlcode),
|
'director': getDirector(htmlcode),
|
||||||
'actor': getActor(htmlcode),
|
'actor': getActor(htmlcode),
|
||||||
'release': getRelease(htmlcode),
|
'release': getRelease(htmlcode),
|
||||||
'number': getNum(htmlcode),
|
'number': getNum(htmlcode),
|
||||||
'cover': getCover(htmlcode),
|
'cover': getCover(htmlcode),
|
||||||
'imagecut': 1,
|
'imagecut': 1,
|
||||||
'tag':getTag(htmlcode)
|
'tag': getTag(htmlcode)
|
||||||
}
|
}
|
||||||
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'),)#.encode('UTF-8')
|
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'),)#.encode('UTF-8')
|
||||||
|
|
||||||
|
if 'HEYZO' in number or 'heyzo' in number or 'Heyzo' in number:
|
||||||
|
htmlcode = get_html('https://www.javbus.com/' + number)
|
||||||
|
dww_htmlcode = get_html("https://www.dmm.co.jp/mono/dvd/-/detail/=/cid=" + number.replace("-", ''))
|
||||||
|
dic = {
|
||||||
|
'title': getTitle(htmlcode),
|
||||||
|
'studio': getStudio(htmlcode),
|
||||||
|
'year': getYear(htmlcode),
|
||||||
|
'outline': getOutline(dww_htmlcode),
|
||||||
|
'runtime': getRuntime(htmlcode),
|
||||||
|
'director': getDirector(htmlcode),
|
||||||
|
'actor': getActor(htmlcode),
|
||||||
|
'release': getRelease(htmlcode),
|
||||||
|
'number': getNum(htmlcode),
|
||||||
|
'cover': getCover(htmlcode),
|
||||||
|
'imagecut': 1,
|
||||||
|
'tag': getTag(htmlcode)
|
||||||
|
}
|
||||||
|
js2 = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'), ) # .encode('UTF-8')
|
||||||
|
return js2
|
||||||
|
|
||||||
return js
|
return js
|
||||||
|
|
||||||
def main_uncensored(number):
|
def main_uncensored(number):
|
||||||
@ -120,7 +141,7 @@ def main_uncensored(number):
|
|||||||
'title': getTitle(htmlcode),
|
'title': getTitle(htmlcode),
|
||||||
'studio': getStudio(htmlcode),
|
'studio': getStudio(htmlcode),
|
||||||
'year': getYear(htmlcode),
|
'year': getYear(htmlcode),
|
||||||
'outline': getOutline(htmlcode),
|
'outline': '',
|
||||||
'runtime': getRuntime(htmlcode),
|
'runtime': getRuntime(htmlcode),
|
||||||
'director': getDirector(htmlcode),
|
'director': getDirector(htmlcode),
|
||||||
'actor': getActor(htmlcode),
|
'actor': getActor(htmlcode),
|
||||||
|
16
proxy.ini
Normal file
16
proxy.ini
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
[proxy]
|
||||||
|
proxy=127.0.0.1:1080
|
||||||
|
|
||||||
|
[Name_Rule]
|
||||||
|
location_rule='JAV_output/'+actor+'/'+actor+'-'+year+'- '+title+'['+number+']'
|
||||||
|
naming_rule=actor+'-'+year+'- '+title+'['+number+']'
|
||||||
|
#============================================================
|
||||||
|
#
|
||||||
|
# title=标题,number=番号,stdio=片商,year=年份,director=导演,actor=女优,outline=简介
|
||||||
|
# runtime=时长,release=上市日期,cover=封面URL,tag=类型
|
||||||
|
# 例子:
|
||||||
|
# rule=str('JAV_output/'+actor+'/'+actor+' '+' ['+year+']'+title+' ['+number+']')
|
||||||
|
# 例子结束
|
||||||
|
# 自定义字符(字符串)要加冒号'(内容)',字符串连接要用加号+
|
||||||
|
#
|
||||||
|
#============================================================
|
Loading…
Reference in New Issue
Block a user