Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6fde3f98dd | ||
|
|
838eb9c8db | ||
|
|
687bbfce10 | ||
|
|
4b35113932 | ||
|
|
d672d4d0d7 | ||
|
|
1d3845bb91 | ||
|
|
e5effca854 | ||
|
|
bae82898da | ||
|
|
2e8e7151e3 | ||
|
|
8db74bc34d | ||
|
|
e18392d7d3 | ||
|
|
e4e32c06df | ||
|
|
09802c5632 | ||
|
|
584db78fd0 | ||
|
|
56a41604cb | ||
|
|
8228084a1d | ||
|
|
f16def5f3a |
@@ -5,17 +5,17 @@ import re
|
||||
from retrying import retry
|
||||
import sys
|
||||
|
||||
# content = open('proxy.ini').read()
|
||||
# content = open('config.ini').read()
|
||||
# content = re.sub(r"\xfe\xff","", content)
|
||||
# content = re.sub(r"\xff\xfe","", content)
|
||||
# content = re.sub(r"\xef\xbb\xbf","", content)
|
||||
# open('BaseConfig.cfg', 'w').write(content)
|
||||
|
||||
config = RawConfigParser()
|
||||
if os.path.exists('proxy.ini'):
|
||||
config.read('proxy.ini', encoding='UTF-8')
|
||||
if os.path.exists('config.ini'):
|
||||
config.read('config.ini', encoding='UTF-8')
|
||||
else:
|
||||
with open("proxy.ini", "wt", encoding='UTF-8') as code:
|
||||
with open("config.ini", "wt", encoding='UTF-8') as code:
|
||||
print("[proxy]",file=code)
|
||||
print("proxy=127.0.0.1:1080",file=code)
|
||||
print("timeout=10", file=code)
|
||||
|
||||
@@ -7,7 +7,7 @@ import ADC_function
|
||||
import json
|
||||
import shutil
|
||||
|
||||
version='0.11.1'
|
||||
version='0.11.4'
|
||||
os.chdir(os.getcwd())
|
||||
|
||||
def UpdateCheck():
|
||||
@@ -102,12 +102,20 @@ def getNumber(filepath):
|
||||
print('[-]' + str(os.path.basename(filepath)) + ' Cannot catch the number :')
|
||||
print('[-]' + str(os.path.basename(filepath)) + ' :', e)
|
||||
print('[-]Move ' + os.path.basename(filepath) + ' to failed folder')
|
||||
|
||||
shutil.move(filepath, str(os.getcwd()) + '/' + 'failed/')
|
||||
except IOError as e2:
|
||||
print('[-]' + str(os.path.basename(filepath)) + ' Cannot catch the number :')
|
||||
print('[-]' + str(os.path.basename(filepath)) + ' :', e2)
|
||||
print('[-]Move ' + os.path.basename(filepath) + ' to failed folder')
|
||||
shutil.move(filepath, str(os.getcwd()) + '/' + 'failed/')
|
||||
def RunCore():
|
||||
if os.path.exists('core.py'):
|
||||
os.system('python core.py' + ' "' + i + '" --number "'+getNumber(i)+'"') #选择从py文件启动 (用于源码py)
|
||||
elif os.path.exists('core.exe'):
|
||||
os.system('core.exe' + ' "' + i + '" --number "'+getNumber(i)+'"') #选择从exe文件启动(用于EXE版程序:
|
||||
elif os.path.exists('core.py') and os.path.exists('core.exe'):
|
||||
os.system('python core.py' + ' "' + i + '" --number "' + getNumber(i) + '"') # 选择从py文件启动 (用于源码py)
|
||||
|
||||
if __name__ =='__main__':
|
||||
print('[*]===========AV Data Capture===========')
|
||||
@@ -124,9 +132,7 @@ if __name__ =='__main__':
|
||||
percentage = str(count/int(count_all)*100)[:4]+'%'
|
||||
print('[!] - '+percentage+' ['+str(count)+'/'+count_all+'] -')
|
||||
print("[!]Making Data for [" + i + "],the number is [" + getNumber(i) + "]")
|
||||
os.system('python core.py' + ' "' + i + '" --number "'+getNumber(i)+'"') #选择从py文件启动 (用于源码py)
|
||||
#print('core.exe' + ' "' + i + '" --number "'+getNumber(i)+'"') #选择从exe文件启动(用于EXE版程序
|
||||
#print()
|
||||
RunCore()
|
||||
print("[*]=====================================")
|
||||
|
||||
CEF('JAV_output')
|
||||
|
||||
75
README.md
75
README.md
@@ -1,23 +1,21 @@
|
||||
# AV Data Capture 日本AV元数据刮削器
|
||||
# AV Data Capture 日本电影元数据抓取工具(刮削器)
|
||||
|
||||
|
||||
<a title="Hits" target="_blank" href="https://github.com/b3log/hits"><img src="https://hits.b3log.org/b3log/hits.svg"></a>
|
||||

|
||||
<br>
|
||||

|
||||

|
||||

|
||||
<br>
|
||||

|
||||

|
||||

|
||||
<br>
|
||||

|
||||

|
||||

|
||||
<br>
|
||||

|
||||

|
||||

|
||||
|
||||
|
||||
|
||||
# 目录
|
||||
* [前言](#前言)
|
||||
* [注意事项](#注意事项)
|
||||
* [捐助二维码](#捐助二维码)
|
||||
* [效果图](#效果图)
|
||||
* [免责声明](#免责声明)
|
||||
* [如何使用](#如何使用)
|
||||
@@ -29,22 +27,25 @@
|
||||
* [异常处理(重要)](#5异常处理重要)
|
||||
* [导入至EMBY](#7把jav_output文件夹导入到embykodi中根据封面选片子享受手冲乐趣)
|
||||
* [输出文件示例](#8输出的文件如下)
|
||||
* [写在后面](#9写在后面)
|
||||
* [写在后面](#8写在后面)
|
||||
|
||||
# 前言
|
||||
  目前,我下的AV越来越多,也意味着AV要**集中地管理**,形成本地媒体库。现在有两款主流的AV元数据获取器,"EverAver"和"Javhelper"。前者的优点是元数据获取比较全,缺点是不能批量处理;后者优点是可以批量处理,但是元数据不够全。<br>
|
||||
  为此,综合上述软件特点,我写出了本软件,为了方便的管理本地AV,和更好的手冲体验。<br>
|
||||
  目前,我下的日本电影越来越多,也意味着日本电影要**集中地管理**,形成本地媒体库。现在有两款主流的日本电影元数据获取器,"EverAver"和"Javhelper"。前者的优点是元数据获取比较全,缺点是不能批量处理;后者优点是可以批量处理,但是元数据不够全。<br>
|
||||
  为此,综合上述软件特点,我写出了本软件,为了方便的管理本地日本电影,和更好的手冲体验。<br>
|
||||
  希望大家可以认真耐心地看完本文档,你的耐心换来的是完美的管理方式。<br>
|
||||
  本软件更新可能比较**频繁**,麻烦诸位用户**积极更新新版本**以获得**最佳体验**。
|
||||
- - -
|
||||
**可以结合pockies大神的[ 打造本地AV(毛片)媒体库 ](https://pockies.github.io/2019/03/25/everaver-emby-kodi/)看本文档**<br>
|
||||
**tg官方电报群:[ 点击进群](https://t.me/AV_Data_Capture_Official)**<br>
|
||||
**推荐用法: 使用该软件后,对于不能正常获取元数据的电影可以用[ Everaver ](http://everaver.blogspot.com/)来补救**<br>
|
||||
**推荐用法: 使用该软件后,对于不能正常获取元数据的电影可以用 Everaver 来补救**<br>
|
||||
暂不支持多P电影<br>
|
||||
[回到目录](#目录)
|
||||
|
||||
# 注意事项
|
||||
**如果在中国大陆网站,请低调传播本软件或者不传播该软件**<br>
|
||||
# 郑重声明
|
||||
1.本软件仅供**技术交流,学术交流**使用<br>
|
||||
2.本软件禁止用于任何非法用途<br>
|
||||
3.使用者使用该软件产生的一切法律后果由使用者承担<br>
|
||||
4.本软件禁止任何商用行为<br>
|
||||
[回到目录](#目录)
|
||||
|
||||
# 效果图
|
||||
**由于法律因素,图片必须经马赛克处理**<br>
|
||||
@@ -52,18 +53,6 @@
|
||||
<br>
|
||||
[回到目录](#目录)
|
||||
|
||||
# 捐助二维码
|
||||
如果你觉得本软件好用,可以考虑捐助作者,多少钱无所谓,不强求,你的支持就是我的动力,非常感谢您的捐助
|
||||
<br>
|
||||
[回到目录](#目录)
|
||||
|
||||
# 免责声明
|
||||
1.本软件仅供技术交流,学术交流使用<br>
|
||||
2.本软件不提供任何有关淫秽色情的影视下载方式<br>
|
||||
3.使用者使用该软件产生的一切法律后果由使用者承担<br>
|
||||
4.该软件禁止任何商用行为<br>
|
||||
[回到目录](#目录)
|
||||
|
||||
# 如何使用
|
||||
### 下载
|
||||
* release的程序可脱离**python环境**运行,可跳过 [模块安装](#1请安装模块在cmd终端逐条输入以下命令安装)<br>下载地址(**仅限Windows**):[点击前往](https://github.com/wenead99/AV_Data_Capture/releases)<br>
|
||||
@@ -121,14 +110,18 @@ proxy.ini
|
||||
例子:```proxy=127.0.0.1:1080```<br>素人系列抓取建议使用日本代理<br>
|
||||
**(路由器拥有自动代理功能的可以把proxy=后面内容去掉)**<br>
|
||||
**如果遇到tineout错误,可以把文件的proxy=后面的地址和端口删除,并开启vpn全局模式,或者重启电脑,vpn,网卡**<br>
|
||||
##### 连接超时重试设置
|
||||
>timeout=10
|
||||
#### 连接超时重试设置
|
||||
>[proxy]<br>
|
||||
>timeout=10<br>
|
||||
|
||||
10为超时重试时间 单位:秒
|
||||
##### 连接重试次数设置
|
||||
>retry=3
|
||||
#### 连接重试次数设置
|
||||
>[proxy]<br>
|
||||
>retry=3<br>
|
||||
|
||||
3即为重试次数
|
||||
|
||||
### 2.(可选)设置自定义目录和影片重命名规则
|
||||
### (可选)设置自定义目录和影片重命名规则
|
||||
**已有默认配置**<br>
|
||||
##### 命名参数<br>
|
||||
>title = 片名<br>
|
||||
@@ -170,7 +163,7 @@ COSQ-004.mp4
|
||||
```
|
||||
|
||||
针对**野鸡番号**,你需要把文件名命名为与抓取网站提供的番号一致(文件拓展名除外),然后把文件拖拽至core.exe/.py<br>
|
||||
**野鸡番号**:比如 DCL-001-1这种野鸡三段式番号,在javbus等资料库存在的作品。
|
||||
**野鸡番号**:比如 DCL-001-1这种野鸡三段式番号,在javbus等资料库存在的作品。<br>(除了SSNI-XXX-C,后面这种-C的是指电影有中文字幕!)
|
||||
<br>
|
||||
条件:文件名中间要有下划线或者减号"_","-",没有多余的内容只有番号为最佳,可以让软件更好获取元数据
|
||||
对于多影片重命名,可以用[ReNamer](http://www.den4b.com/products/renamer)来批量重命名<br>
|
||||
@@ -182,14 +175,8 @@ COSQ-004.mp4
|
||||
## 6.软件会自动把元数据获取成功的电影移动到JAV_output文件夹中,根据女优分类,失败的电影移动到failed文件夹中。
|
||||
## 7.把JAV_output文件夹导入到EMBY,KODI中,根据封面选片子,享受手冲乐趣
|
||||
cookies大神的EMBY教程:[链接](https://pockies.github.io/2019/03/25/everaver-emby-kodi/#%E5%AE%89%E8%A3%85emby%E5%B9%B6%E6%B7%BB%E5%8A%A0%E5%AA%92%E4%BD%93%E5%BA%93)<br>
|
||||
[回到目录](#目录)
|
||||
## 8.输出的文件如下
|
||||

|
||||

|
||||
<br>
|
||||
[回到目录](#目录)
|
||||
## 9.写在后面
|
||||
怎么样,看着自己的AV被这样完美地管理,是不是感觉成就感爆棚呢?<br>
|
||||
## 8.写在后面
|
||||
怎么样,看着自己的日本电影被这样完美地管理,是不是感觉成就感爆棚呢?<br>
|
||||
[回到目录](#目录)
|
||||
|
||||
|
||||
|
||||
53
core.py
53
core.py
@@ -30,6 +30,9 @@ tag=[]
|
||||
cn_sub=''
|
||||
path=''
|
||||
houzhui=''
|
||||
website=''
|
||||
json_data={}
|
||||
actor_photo={}
|
||||
naming_rule =''#eval(config['Name_Rule']['naming_rule'])
|
||||
location_rule=''#eval(config['Name_Rule']['location_rule'])
|
||||
|
||||
@@ -63,6 +66,8 @@ def getDataFromJSON(file_number): #从JSON返回元数据
|
||||
global tag
|
||||
global image_main
|
||||
global cn_sub
|
||||
global website
|
||||
global actor_photo
|
||||
|
||||
global naming_rule
|
||||
global location_rule
|
||||
@@ -70,7 +75,7 @@ def getDataFromJSON(file_number): #从JSON返回元数据
|
||||
try: # 添加 需要 正则表达式的规则
|
||||
# =======================javdb.py=======================
|
||||
if re.search('^\d{5,}', file_number).group() in file_number:
|
||||
json_data = json.loads(javdb.main(file_number))
|
||||
json_data = json.loads(javbus.main_uncensored(file_number))
|
||||
except: # 添加 无需 正则表达式的规则
|
||||
# ====================fc2fans_club.py====================
|
||||
if 'fc2' in file_number:
|
||||
@@ -99,6 +104,8 @@ def getDataFromJSON(file_number): #从JSON返回元数据
|
||||
imagecut = json_data['imagecut']
|
||||
tag = str(json_data['tag']).strip("[ ]").replace("'", '').replace(" ", '').split(',') # 字符串转列表
|
||||
actor = str(actor_list).strip("[ ]").replace("'", '').replace(" ", '')
|
||||
actor_photo = json_data['actor_photo']
|
||||
website = json_data['website']
|
||||
|
||||
# ====================处理异常字符====================== #\/:*?"<>|
|
||||
if '\\' in title:
|
||||
@@ -142,7 +149,7 @@ def creatFolder(): #创建文件夹
|
||||
#=====================资源下载部分===========================
|
||||
def DownloadFileWithFilename(url,filename,path): #path = examle:photo , video.in the Project Folder!
|
||||
config = ConfigParser()
|
||||
config.read('proxy.ini', encoding='UTF-8')
|
||||
config.read('config.ini', encoding='UTF-8')
|
||||
proxy = str(config['proxy']['proxy'])
|
||||
timeout = int(config['proxy']['timeout'])
|
||||
retry_count = int(config['proxy']['retry'])
|
||||
@@ -184,19 +191,20 @@ def DownloadFileWithFilename(url,filename,path): #path = examle:photo , video.in
|
||||
print('[-]Image Download : Connect retry '+str(i)+'/'+str(retry_count))
|
||||
def imageDownload(filepath): #封面是否下载成功,否则移动到failed
|
||||
global path
|
||||
if DownloadFileWithFilename(cover,naming_rule+'.jpg', path) == 'failed':
|
||||
if DownloadFileWithFilename(cover,'fanart.jpg', path) == 'failed':
|
||||
shutil.move(filepath, 'failed/')
|
||||
os._exit(0)
|
||||
DownloadFileWithFilename(cover, naming_rule+'.jpg', path)
|
||||
print('[+]Image Downloaded!', path +'/'+naming_rule+'.jpg')
|
||||
DownloadFileWithFilename(cover, 'fanart.jpg', path)
|
||||
print('[+]Image Downloaded!', path +'/fanart.jpg')
|
||||
def PrintFiles(filepath):
|
||||
#global path
|
||||
global title
|
||||
global cn_sub
|
||||
global actor_photo
|
||||
try:
|
||||
if not os.path.exists(path):
|
||||
os.makedirs(path)
|
||||
with open(path + "/" + naming_rule + ".nfo", "wt", encoding='UTF-8') as code:
|
||||
with open(path + "/" + number + ".nfo", "wt", encoding='UTF-8') as code:
|
||||
print("<movie>", file=code)
|
||||
print(" <title>" + naming_rule + "</title>", file=code)
|
||||
print(" <set>", file=code)
|
||||
@@ -207,13 +215,15 @@ def PrintFiles(filepath):
|
||||
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)
|
||||
print(" <poster>poster.png</poster>", file=code)
|
||||
print(" <thumb>thumb.png</thumb>", file=code)
|
||||
print(" <fanart>fanart.jpg</fanart>", file=code)
|
||||
try:
|
||||
for u in actor_list:
|
||||
for key, value in actor_photo.items():
|
||||
print(" <actor>", file=code)
|
||||
print(" <name>" + u + "</name>", file=code)
|
||||
print(" <name>" + key + "</name>", file=code)
|
||||
if not actor_photo == '': # or actor_photo == []:
|
||||
print(" <thumb>" + value + "</thumb>", file=code)
|
||||
print(" </actor>", file=code)
|
||||
except:
|
||||
aaaa=''
|
||||
@@ -237,9 +247,9 @@ def PrintFiles(filepath):
|
||||
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(" <website>" + website + "</website>", file=code)
|
||||
print("</movie>", file=code)
|
||||
print("[+]Writeed! "+path + "/" + naming_rule + ".nfo")
|
||||
print("[+]Writeed! "+path + "/" + number + ".nfo")
|
||||
except IOError as e:
|
||||
print("[-]Write Failed!")
|
||||
print(e)
|
||||
@@ -253,31 +263,32 @@ def PrintFiles(filepath):
|
||||
def cutImage():
|
||||
if imagecut == 1:
|
||||
try:
|
||||
img = Image.open(path + '/' + naming_rule + '.jpg')
|
||||
img = Image.open(path + '/fanart.jpg')
|
||||
imgSize = img.size
|
||||
w = img.width
|
||||
h = img.height
|
||||
img2 = img.crop((w / 1.9, 0, w, h))
|
||||
img2.save(path + '/' + naming_rule + '.png')
|
||||
img2.save(path + '/poster.png')
|
||||
except:
|
||||
print('[-]Cover cut failed!')
|
||||
else:
|
||||
img = Image.open(path + '/' + naming_rule + '.jpg')
|
||||
img = Image.open(path + '/fanart.jpg')
|
||||
w = img.width
|
||||
h = img.height
|
||||
img.save(path + '/' + naming_rule + '.png')
|
||||
img.save(path + '/poster.png')
|
||||
def pasteFileToFolder(filepath, path): #文件路径,番号,后缀,要移动至的位置
|
||||
global houzhui
|
||||
houzhui = str(re.search('[.](AVI|RMVB|WMV|MOV|MP4|MKV|FLV|TS|avi|rmvb|wmv|mov|mp4|mkv|flv|ts)$', filepath).group())
|
||||
os.rename(filepath, naming_rule + houzhui)
|
||||
shutil.move(naming_rule + houzhui, path)
|
||||
os.rename(filepath, number + houzhui)
|
||||
shutil.move(number + houzhui, path)
|
||||
def renameJpgToBackdrop_copy():
|
||||
shutil.copy(path+'/'+naming_rule + '.jpg', path+'/Backdrop.jpg')
|
||||
shutil.copy(path+'/fanart.jpg', path+'/Backdrop.jpg')
|
||||
shutil.copy(path + '/poster.png', path + '/thumb.png')
|
||||
|
||||
if __name__ == '__main__':
|
||||
filepath=argparse_get_file()[0] #影片的路径
|
||||
|
||||
if '-c.' in filepath or '-C.' in filepath:
|
||||
if '-c.' in filepath or '-C.' in filepath or '中文' in filepath or '字幕' in filepath:
|
||||
cn_sub='1'
|
||||
|
||||
if argparse_get_file()[1] == '': #获取手动拉去影片获取的番号
|
||||
|
||||
@@ -72,7 +72,9 @@ def main(number2):
|
||||
'number': 'FC2-'+number,
|
||||
'cover': getCover(htmlcode,number,htmlcode2),
|
||||
'imagecut': 0,
|
||||
'tag':getTag(htmlcode),
|
||||
'tag': getTag(htmlcode),
|
||||
'actor_photo':'',
|
||||
'website': 'http://fc2fans.club/html/FC2-' + number + '.html',
|
||||
}
|
||||
#print(getTitle(htmlcode))
|
||||
#print(getNum(htmlcode))
|
||||
|
||||
26
javbus.py
26
javbus.py
@@ -13,6 +13,18 @@ from ADC_function import *
|
||||
import javdb
|
||||
import siro
|
||||
|
||||
def getActorPhoto(htmlcode): #//*[@id="star_qdt"]/li/a/img
|
||||
soup = BeautifulSoup(htmlcode, 'lxml')
|
||||
a = soup.find_all(attrs={'class': 'star-name'})
|
||||
d={}
|
||||
for i in a:
|
||||
l=i.a['href']
|
||||
t=i.get_text()
|
||||
html = etree.fromstring(get_html(l), etree.HTMLParser())
|
||||
p=str(html.xpath('//*[@id="waterfall"]/div[1]/div/div[1]/img/@src')).strip(" ['']")
|
||||
p2={t:p}
|
||||
d.update(p2)
|
||||
return d
|
||||
def getTitle(htmlcode): #获取标题
|
||||
doc = pq(htmlcode)
|
||||
title=str(doc('div.container h3').text()).replace(' ','-')
|
||||
@@ -100,17 +112,18 @@ def main(number):
|
||||
'imagecut': 1,
|
||||
'tag': getTag(htmlcode),
|
||||
'label': getSerise(htmlcode),
|
||||
'actor_photo': getActorPhoto(htmlcode),
|
||||
'website': 'https://www.javbus.com/' + number,
|
||||
}
|
||||
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("-", ''))
|
||||
#dww_htmlcode = get_html("https://www.dmm.co.jp/mono/dvd/-/detail/=/cid=" + number.replace("-", ''))
|
||||
dic = {
|
||||
'title': str(re.sub('\w+-\d+-', '', getTitle(htmlcode))),
|
||||
'studio': getStudio(htmlcode),
|
||||
'year': getYear(htmlcode),
|
||||
'outline': getOutline(dww_htmlcode),
|
||||
'outline': '',
|
||||
'runtime': getRuntime(htmlcode),
|
||||
'director': getDirector(htmlcode),
|
||||
'actor': getActor(htmlcode),
|
||||
@@ -120,6 +133,8 @@ def main(number):
|
||||
'imagecut': 1,
|
||||
'tag': getTag(htmlcode),
|
||||
'label': getSerise(htmlcode),
|
||||
'actor_photo': getActorPhoto(htmlcode),
|
||||
'website': 'https://www.javbus.com/' + number,
|
||||
}
|
||||
js2 = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4,
|
||||
separators=(',', ':'), ) # .encode('UTF-8')
|
||||
@@ -132,6 +147,9 @@ def main(number):
|
||||
def main_uncensored(number):
|
||||
htmlcode = get_html('https://www.javbus.com/' + number)
|
||||
dww_htmlcode = get_html("https://www.dmm.co.jp/mono/dvd/-/detail/=/cid=" + number.replace("-", ''))
|
||||
if getTitle(htmlcode) == '':
|
||||
htmlcode = get_html('https://www.javbus.com/' + number.replace('-','_'))
|
||||
dww_htmlcode = get_html("https://www.dmm.co.jp/mono/dvd/-/detail/=/cid=" + number.replace("-", ''))
|
||||
dic = {
|
||||
'title': str(re.sub('\w+-\d+-','',getTitle(htmlcode))).replace(getNum(htmlcode)+'-',''),
|
||||
'studio': getStudio(htmlcode),
|
||||
@@ -146,6 +164,8 @@ def main_uncensored(number):
|
||||
'tag': getTag(htmlcode),
|
||||
'label': getSerise(htmlcode),
|
||||
'imagecut': 0,
|
||||
'actor_photo': '',
|
||||
'website': 'https://www.javbus.com/' + number,
|
||||
}
|
||||
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'), ) # .encode('UTF-8')
|
||||
|
||||
|
||||
19
javdb.py
19
javdb.py
@@ -56,6 +56,8 @@ def getTag(a):
|
||||
def getCover(htmlcode):
|
||||
html = etree.fromstring(htmlcode, etree.HTMLParser())
|
||||
result = str(html.xpath('/html/body/section/div/div[2]/div[1]/a/img/@src')).strip(" ['']")
|
||||
if result == '':
|
||||
result = str(html.xpath('/html/body/section/div/div[3]/div[1]/a/img/@src')).strip(" ['']")
|
||||
return result
|
||||
def getDirector(a):
|
||||
html = etree.fromstring(a, etree.HTMLParser()) # //table/tr[1]/td[1]/text()
|
||||
@@ -68,11 +70,11 @@ def getOutline(htmlcode):
|
||||
return result
|
||||
def main(number):
|
||||
try:
|
||||
try:
|
||||
a = get_html('https://javdb1.com/search?q=' + number + '&f=all')
|
||||
a = get_html('https://javdb.com/search?q=' + number + '&f=all')
|
||||
html = etree.fromstring(a, etree.HTMLParser()) # //table/tr[1]/td[1]/text()
|
||||
except:
|
||||
a = get_html('https://javdb1.com/search?q=' + number.replace('-', '_') + '&f=all')
|
||||
result1 = str(html.xpath('//*[@id="videos"]/div/div/a/@href')).strip(" ['']")
|
||||
if result1 == '':
|
||||
a = get_html('https://javdb.com/search?q=' + number.replace('-', '_') + '&f=all')
|
||||
html = etree.fromstring(a, etree.HTMLParser()) # //table/tr[1]/td[1]/text()
|
||||
result1 = str(html.xpath('//*[@id="videos"]/div/div/a/@href')).strip(" ['']")
|
||||
b = get_html('https://javdb1.com' + result1)
|
||||
@@ -95,17 +97,20 @@ def main(number):
|
||||
'tag': getTag(a),
|
||||
'label': getLabel(a),
|
||||
'year': getYear(getRelease(a)), # str(re.search('\d{4}',getRelease(a)).group()),
|
||||
'actor_photo': '',
|
||||
'website': 'https://javdb1.com' + result1,
|
||||
}
|
||||
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'), ) # .encode('UTF-8')
|
||||
return js
|
||||
except:
|
||||
try:
|
||||
a = get_html('https://javdb.com/search?q=' + number + '&f=all')
|
||||
html = etree.fromstring(a, etree.HTMLParser()) # //table/tr[1]/td[1]/text()
|
||||
except:
|
||||
result1 = str(html.xpath('//*[@id="videos"]/div/div/a/@href')).strip(" ['']")
|
||||
if result1 == '':
|
||||
a = get_html('https://javdb.com/search?q=' + number.replace('-', '_') + '&f=all')
|
||||
html = etree.fromstring(a, etree.HTMLParser()) # //table/tr[1]/td[1]/text()
|
||||
result1 = str(html.xpath('//*[@id="videos"]/div/div/a/@href')).strip(" ['']")
|
||||
|
||||
b = get_html('https://javdb.com' + result1)
|
||||
soup = BeautifulSoup(b, 'lxml')
|
||||
|
||||
@@ -126,6 +131,8 @@ def main(number):
|
||||
'tag': getTag(a),
|
||||
'label': getLabel(a),
|
||||
'year': getYear(getRelease(a)), # str(re.search('\d{4}',getRelease(a)).group()),
|
||||
'actor_photo': '',
|
||||
'website':'https://javdb.com' + result1,
|
||||
}
|
||||
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'), ) # .encode('UTF-8')
|
||||
return js
|
||||
|
||||
2
siro.py
2
siro.py
@@ -95,6 +95,8 @@ def main(number2):
|
||||
'tag': getTag(a),
|
||||
'label':getLabel(a),
|
||||
'year': getYear(getRelease(a)), # str(re.search('\d{4}',getRelease(a)).group()),
|
||||
'actor_photo': '',
|
||||
'website':'https://www.mgstage.com/product/product_detail/'+str(number)+'/',
|
||||
}
|
||||
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'),)#.encode('UTF-8')
|
||||
return js
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": "0.11.1",
|
||||
"version_show":"Beta 11.1",
|
||||
"version": "0.11.4",
|
||||
"version_show":"Beta 11.4",
|
||||
"download": "https://github.com/wenead99/AV_Data_Capture/releases"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user