Merge pull request #730 from Suwmlee/master

fix: madou title
This commit is contained in:
Yoshiko2
2022-03-21 18:44:46 +08:00
committed by GitHub

View File

@@ -15,12 +15,13 @@ def getActorPhoto(html):
return '' return ''
def getTitle(html, number): # 获取标题 def getTitle(html): # 获取标题
# <title>MD0140-2 / 家有性事EP2 爱在身边-麻豆社</title> # <title>MD0140-2 / 家有性事EP2 爱在身边-麻豆社</title>
# <title>MAD039 机灵可爱小叫花 强诱僧人迫犯色戒-麻豆社</title> # <title>MAD039 机灵可爱小叫花 强诱僧人迫犯色戒-麻豆社</title>
# <title>MD0094贫嘴贱舌中出大嫂坏嫂嫂和小叔偷腥内射受孕-麻豆社</title>
browser_title = str(html.xpath("/html/head/title/text()")[0]) browser_title = str(html.xpath("/html/head/title/text()")[0])
return str(re.findall(r'^.*?( / | )(.*)-麻豆社$', browser_title)[0][1]).strip() title = str(re.findall(r'^.*?( / | |)(.*)-麻豆社$', browser_title)[0][1]).strip()
return title.replace('', ' ')
def getStudio(html): # 获取厂商 已修改 def getStudio(html): # 获取厂商 已修改
try: try:
@@ -115,7 +116,7 @@ def main(number):
actor = '' actor = ''
dic = { dic = {
# 标题 # 标题
'title': getTitle(html, number), 'title': getTitle(html),
# 制作商 # 制作商
'studio': studio, 'studio': studio,
# 年份 # 年份