Beta 10.3 Update 2019.6.20
This commit is contained in:
parent
2747be4a21
commit
b5a23fe430
@ -3,6 +3,20 @@ import os
|
|||||||
import time
|
import time
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
from ADC_function import *
|
||||||
|
import json
|
||||||
|
|
||||||
|
version='0.10.3'
|
||||||
|
|
||||||
|
def UpdateCheck():
|
||||||
|
html2 = get_html('https://raw.githubusercontent.com/wenead99/AV_Data_Capture/master/update_check.json')
|
||||||
|
html = json.loads(str(html2))
|
||||||
|
|
||||||
|
if not version == html['version']:
|
||||||
|
print('[*] * New update '+html['version']+' *')
|
||||||
|
print('[*] * Download *')
|
||||||
|
print('[*] '+html['download'])
|
||||||
|
print('[*]=====================================')
|
||||||
|
|
||||||
def movie_lists():
|
def movie_lists():
|
||||||
#MP4
|
#MP4
|
||||||
@ -48,6 +62,10 @@ def rreplace(self, old, new, *max):
|
|||||||
return new.join(self.rsplit(old, count))
|
return new.join(self.rsplit(old, count))
|
||||||
|
|
||||||
if __name__ =='__main__':
|
if __name__ =='__main__':
|
||||||
|
print('[*]===========AV Data Capture===========')
|
||||||
|
print('[*] Version '+version)
|
||||||
|
print('[*]=====================================')
|
||||||
|
UpdateCheck()
|
||||||
os.chdir(os.getcwd())
|
os.chdir(os.getcwd())
|
||||||
for i in movie_lists(): #遍历电影列表 交给core处理
|
for i in movie_lists(): #遍历电影列表 交给core处理
|
||||||
if '_' in i:
|
if '_' in i:
|
||||||
|
28
core.py
28
core.py
@ -107,32 +107,10 @@ def getNumberFromFilename(filepath):
|
|||||||
except: #添加 无需 正则表达式的规则
|
except: #添加 无需 正则表达式的规则
|
||||||
# ====================fc2fans_club.py===================
|
# ====================fc2fans_club.py===================
|
||||||
if 'fc2' in filename:
|
if 'fc2' in filename:
|
||||||
json_data = json.loads(fc2fans_club.main(file_number.strip('fc2_').strip('fc2-')))
|
json_data = json.loads(fc2fans_club.main(file_number.strip('fc2_').strip('fc2-').strip('ppv-').strip('PPV-')))
|
||||||
elif 'FC2' in filename:
|
elif 'FC2' in filename:
|
||||||
json_data = json.loads(fc2fans_club.main(file_number.strip('FC2_').strip('FC2-')))
|
json_data = json.loads(fc2fans_club.main(file_number.strip('FC2_').strip('FC2-').strip('ppv-').strip('PPV-')))
|
||||||
|
#print(file_number.strip('FC2_').strip('FC2-').strip('ppv-').strip('PPV-'))
|
||||||
#========================siro.py========================
|
|
||||||
elif 'siro' in filename:
|
|
||||||
json_data = json.loads(siro.main(file_number))
|
|
||||||
elif 'SIRO' in filename:
|
|
||||||
json_data = json.loads(siro.main(file_number))
|
|
||||||
elif '259luxu' in filename:
|
|
||||||
json_data = json.loads(siro.main(file_number))
|
|
||||||
elif '259LUXU' in filename:
|
|
||||||
json_data = json.loads(siro.main(file_number))
|
|
||||||
elif '300MAAN' in filename:
|
|
||||||
json_data = json.loads(siro.main(file_number))
|
|
||||||
elif '300maan' in filename:
|
|
||||||
json_data = json.loads(siro.main(file_number))
|
|
||||||
elif '326SCP' in filename:
|
|
||||||
json_data = json.loads(siro.main(file_number))
|
|
||||||
elif '326scp' in filename:
|
|
||||||
json_data = json.loads(siro.main(file_number))
|
|
||||||
elif '326URF' in filename:
|
|
||||||
json_data = json.loads(siro.main(file_number))
|
|
||||||
elif '326urf' in filename:
|
|
||||||
json_data = json.loads(siro.main(file_number))
|
|
||||||
|
|
||||||
#=======================javbus.py=======================
|
#=======================javbus.py=======================
|
||||||
else:
|
else:
|
||||||
json_data = json.loads(javbus.main(file_number))
|
json_data = json.loads(javbus.main(file_number))
|
||||||
|
@ -8,6 +8,7 @@ def getTitle(htmlcode): #获取厂商
|
|||||||
html = etree.fromstring(htmlcode,etree.HTMLParser())
|
html = etree.fromstring(htmlcode,etree.HTMLParser())
|
||||||
result = str(html.xpath('/html/body/div[2]/div/div[1]/h3/text()')).strip(" ['']")
|
result = str(html.xpath('/html/body/div[2]/div/div[1]/h3/text()')).strip(" ['']")
|
||||||
result2 = str(re.sub('\D{2}2-\d+','',result)).replace(' ','',1)
|
result2 = str(re.sub('\D{2}2-\d+','',result)).replace(' ','',1)
|
||||||
|
#print(result2)
|
||||||
return result2
|
return result2
|
||||||
def getStudio(htmlcode): #获取厂商
|
def getStudio(htmlcode): #获取厂商
|
||||||
html = etree.fromstring(htmlcode,etree.HTMLParser())
|
html = etree.fromstring(htmlcode,etree.HTMLParser())
|
||||||
@ -16,6 +17,7 @@ def getStudio(htmlcode): #获取厂商
|
|||||||
def getNum(htmlcode): #获取番号
|
def getNum(htmlcode): #获取番号
|
||||||
html = etree.fromstring(htmlcode, etree.HTMLParser())
|
html = etree.fromstring(htmlcode, etree.HTMLParser())
|
||||||
result = str(html.xpath('/html/body/div[5]/div[1]/div[2]/p[1]/span[2]/text()')).strip(" ['']")
|
result = str(html.xpath('/html/body/div[5]/div[1]/div[2]/p[1]/span[2]/text()')).strip(" ['']")
|
||||||
|
#print(result)
|
||||||
return result
|
return result
|
||||||
def getRelease(number):
|
def getRelease(number):
|
||||||
a=ADC_function.get_html('http://adult.contents.fc2.com/article_search.php?id='+str(number).lstrip("FC2-").lstrip("fc2-").lstrip("fc2_").lstrip("fc2-")+'&utm_source=aff_php&utm_medium=source_code&utm_campaign=from_aff_php')
|
a=ADC_function.get_html('http://adult.contents.fc2.com/article_search.php?id='+str(number).lstrip("FC2-").lstrip("fc2-").lstrip("fc2_").lstrip("fc2-")+'&utm_source=aff_php&utm_medium=source_code&utm_campaign=from_aff_php')
|
||||||
@ -55,6 +57,8 @@ def main(number2):
|
|||||||
'imagecut': 0,
|
'imagecut': 0,
|
||||||
'tag':" ",
|
'tag':" ",
|
||||||
}
|
}
|
||||||
|
#print(getTitle(htmlcode))
|
||||||
|
#print(getNum(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')
|
||||||
return js
|
return js
|
||||||
|
|
||||||
|
23
javbus.py
23
javbus.py
@ -10,6 +10,7 @@ from PIL import Image#need install
|
|||||||
import time
|
import time
|
||||||
import json
|
import json
|
||||||
from ADC_function import *
|
from ADC_function import *
|
||||||
|
import siro
|
||||||
|
|
||||||
def getTitle(htmlcode): #获取标题
|
def getTitle(htmlcode): #获取标题
|
||||||
doc = pq(htmlcode)
|
doc = pq(htmlcode)
|
||||||
@ -70,12 +71,13 @@ def getTag(htmlcode): # 获取演员
|
|||||||
|
|
||||||
|
|
||||||
def main(number):
|
def main(number):
|
||||||
htmlcode=get_html('https://www.javbus.com/'+number)
|
try:
|
||||||
dww_htmlcode=get_html("https://www.dmm.co.jp/mono/dvd/-/detail/=/cid=" + number.replace("-", ''))
|
htmlcode = get_html('https://www.javbus.com/' + number)
|
||||||
|
dww_htmlcode = get_html("https://www.dmm.co.jp/mono/dvd/-/detail/=/cid=" + number.replace("-", ''))
|
||||||
dic = {
|
dic = {
|
||||||
'title': str(re.sub('\w+-\d+-','',getTitle(htmlcode))),
|
'title': str(re.sub('\w+-\d+-', '', getTitle(htmlcode))),
|
||||||
'studio': getStudio(htmlcode),
|
'studio': getStudio(htmlcode),
|
||||||
'year': str(re.search('\d{4}',getYear(htmlcode)).group()),
|
'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),
|
||||||
@ -87,13 +89,13 @@ def main(number):
|
|||||||
'tag': getTag(htmlcode),
|
'tag': getTag(htmlcode),
|
||||||
'label': getSerise(htmlcode),
|
'label': getSerise(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:
|
if 'HEYZO' in number or 'heyzo' in number or 'Heyzo' in 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': str(re.sub('\w+-\d+-','',getTitle(htmlcode))),
|
'title': str(re.sub('\w+-\d+-', '', getTitle(htmlcode))),
|
||||||
'studio': getStudio(htmlcode),
|
'studio': getStudio(htmlcode),
|
||||||
'year': getYear(htmlcode),
|
'year': getYear(htmlcode),
|
||||||
'outline': getOutline(dww_htmlcode),
|
'outline': getOutline(dww_htmlcode),
|
||||||
@ -107,10 +109,13 @@ def main(number):
|
|||||||
'tag': getTag(htmlcode),
|
'tag': getTag(htmlcode),
|
||||||
'label': getSerise(htmlcode),
|
'label': getSerise(htmlcode),
|
||||||
}
|
}
|
||||||
js2 = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'), ) # .encode('UTF-8')
|
js2 = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4,
|
||||||
|
separators=(',', ':'), ) # .encode('UTF-8')
|
||||||
return js2
|
return js2
|
||||||
|
|
||||||
return js
|
return js
|
||||||
|
except:
|
||||||
|
a=siro.main(number)
|
||||||
|
return a
|
||||||
|
|
||||||
def main_uncensored(number):
|
def main_uncensored(number):
|
||||||
htmlcode = get_html('https://www.javbus.com/' + number)
|
htmlcode = get_html('https://www.javbus.com/' + number)
|
||||||
@ -155,6 +160,8 @@ def main_uncensored(number):
|
|||||||
|
|
||||||
return js
|
return js
|
||||||
|
|
||||||
|
#print(main('SIRO-3821'))
|
||||||
|
|
||||||
|
|
||||||
# def return1():
|
# def return1():
|
||||||
# json_data=json.loads(main('ipx-292'))
|
# json_data=json.loads(main('ipx-292'))
|
||||||
|
Loading…
Reference in New Issue
Block a user