更可靠的无码识别方法
This commit is contained in:
@@ -40,6 +40,7 @@ def main(number: str) -> json:
|
||||
'website': f'{G_SITE}/moviepages/{number}/index.html',
|
||||
'source': 'carib.py',
|
||||
'series': get_series(lx),
|
||||
'无码': True
|
||||
}
|
||||
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'), )
|
||||
return js
|
||||
|
||||
@@ -83,6 +83,9 @@ def getExtrafanart(htmlcode): # 获取剧照
|
||||
if extrafanart_imgs:
|
||||
return [urljoin('https://www.javbus.com',img) for img in extrafanart_imgs]
|
||||
return ''
|
||||
def getUncensored(html):
|
||||
x = html.xpath('//*[@id="navbar"]/ul[1]/li[@class="active"]/a[contains(@href,"uncensored")]')
|
||||
return bool(x)
|
||||
|
||||
def main_uncensored(number):
|
||||
htmlcode = get_html('https://www.javbus.com/ja/' + number)
|
||||
@@ -109,6 +112,7 @@ def main_uncensored(number):
|
||||
'website': 'https://www.javbus.com/ja/' + number,
|
||||
'source': 'javbus.py',
|
||||
'series': getSeriseJa(lx),
|
||||
'无码': getUncensored(lx)
|
||||
}
|
||||
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'), ) # .encode('UTF-8')
|
||||
return js
|
||||
@@ -151,6 +155,7 @@ def main(number):
|
||||
'website': 'https://www.javbus.com/' + number,
|
||||
'source': 'javbus.py',
|
||||
'series': getSerise(lx),
|
||||
'无码': getUncensored(lx)
|
||||
}
|
||||
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4,separators=(',', ':'), ) # .encode('UTF-8')
|
||||
return js
|
||||
|
||||
@@ -179,6 +179,9 @@ def getUserRating(html):
|
||||
return float(v[0][0]), int(v[0][1])
|
||||
except:
|
||||
return
|
||||
def getUncensored(html):
|
||||
x = html.xpath('//strong[contains(text(),"類別")]/../span/a[contains(@href,"/tags/uncensored?")]')
|
||||
return bool(x)
|
||||
|
||||
def main(number):
|
||||
# javdb更新后同一时间只能登录一个数字站,最新登录站会踢出旧的登录,因此按找到的第一个javdb*.json文件选择站点,
|
||||
@@ -300,7 +303,7 @@ def main(number):
|
||||
'website': urljoin('https://javdb.com', correct_url),
|
||||
'source': 'javdb.py',
|
||||
'series': getSeries(lx),
|
||||
|
||||
'无码': getUncensored(lx)
|
||||
}
|
||||
userrating = getUserRating(lx)
|
||||
if isinstance(userrating, tuple) and len(userrating) == 2:
|
||||
@@ -328,7 +331,7 @@ if __name__ == "__main__":
|
||||
# print(main('blacked.20.05.30'))
|
||||
# print(main('AGAV-042'))
|
||||
# print(main('BANK-022'))
|
||||
# print(main('070116-197'))
|
||||
print(main('070116-197'))
|
||||
# print(main('093021_539')) # 没有剧照 片商pacopacomama
|
||||
#print(main('FC2-2278260'))
|
||||
# print(main('FC2-735670'))
|
||||
|
||||
@@ -146,7 +146,8 @@ def main(number):
|
||||
'website': url,
|
||||
'source': 'madou.py',
|
||||
# 使用
|
||||
'series': getSerise(html)
|
||||
'series': getSerise(html),
|
||||
'无码': True
|
||||
}
|
||||
js = json.dumps(dic, ensure_ascii=False, sort_keys=True,
|
||||
indent=4, separators=(',', ':'), ) # .encode('UTF-8')
|
||||
|
||||
Reference in New Issue
Block a user