From 0cd9fdc52de99fd8ce31b95bf37425b648952638 Mon Sep 17 00:00:00 2001 From: mo_yy Date: Thu, 23 Jul 2020 22:37:37 +0800 Subject: [PATCH] V3.961 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复JAVDB封面链接为空的问题。 --- AVDC_Main.py | 2 +- Function/Function.py | 2 +- Getter/javdb.py | 4 ++-- Getter/mgstage.py | 24 ++++++++++++------------ Ui/AVDC.py | 2 +- Ui/AVDC.ui | 2 +- update_check.json | 4 ++-- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/AVDC_Main.py b/AVDC_Main.py index f18c1cb84..23feedf02 100644 --- a/AVDC_Main.py +++ b/AVDC_Main.py @@ -33,7 +33,7 @@ def __init__(self, parent=None): self.Init_Ui() self.set_style() # 初始化需要的变量 - self.version = '3.96' + self.version = '3.961' self.m_drag = False self.m_DragPosition = 0 self.count_claw = 0 # 批量刮削次数 diff --git a/Function/Function.py b/Function/Function.py index a15b0b93e..8db00eb38 100644 --- a/Function/Function.py +++ b/Function/Function.py @@ -106,7 +106,7 @@ def getNumber(filepath, escape_string): elif '-' in filename or '_' in filename: # 普通提取番号 主要处理包含减号-和_的番号 if 'FC2' or 'fc2' in filename: filename = filename.upper().replace('PPV', '').replace('--', '-') - if re.search('FC2-\d{5,}', filename): # 提取类似mkbd-120番号 + if re.search('FC2-\d{5,}', filename): # 提取类似fc2-111111番号 file_number = re.search('FC2-\d{5,}', filename).group() elif re.search('[a-zA-Z]+-\d+', filename): # 提取类似mkbd-120番号 file_number = re.search('\w+-\d+', filename).group() diff --git a/Getter/javdb.py b/Getter/javdb.py index fc66dcbe4..fa19b355c 100644 --- a/Getter/javdb.py +++ b/Getter/javdb.py @@ -104,10 +104,10 @@ def getCover_small(htmlcode, count): def getCover(htmlcode): html = etree.fromstring(htmlcode, etree.HTMLParser()) - result = str(html.xpath("//img[@class='box video-cover']/@src")).strip(" ['']") + result = str(html.xpath("//img[@class='video-cover']/@src")).strip(" ['']") # 有时xpath找不到元素,所以要用bs4 if not result: - soup = BeautifulSoup(htmlcode, 'lxml', parse_only=SoupStrainer('img', {'class': 'box video-cover'})) + soup = BeautifulSoup(htmlcode, 'lxml', parse_only=SoupStrainer('img', {'class': 'video-cover'})) if soup.img is not None: result = soup.img['src'] return result diff --git a/Getter/mgstage.py b/Getter/mgstage.py index 5cbe899ad..4b748ca06 100644 --- a/Getter/mgstage.py +++ b/Getter/mgstage.py @@ -118,21 +118,21 @@ def main(number): raise TimeoutError actor = getActor(htmlcode).replace(' ', '') dic = { - 'title': getTitle(htmlcode).replace("\\n", '').replace(' ', ''), - 'studio': getStudio(htmlcode), - 'publisher': getPublisher(htmlcode), - 'outline': getOutline(htmlcode).replace('\n', ''), - 'score': getScore(htmlcode), - 'runtime': getRuntime(htmlcode), - 'actor': actor, - 'release': getRelease(htmlcode), - 'number': getNum(htmlcode), - 'cover': getCover(htmlcode), - 'extrafanart': getExtraFanart(htmlcode), + 'title': getTitle(htmlcode).replace("\\n", '').replace(' ', '').strip(','), + 'studio': getStudio(htmlcode).strip(','), + 'publisher': getPublisher(htmlcode).strip(','), + 'outline': getOutline(htmlcode).replace('\n', '').strip(','), + 'score': getScore(htmlcode).strip(','), + 'runtime': getRuntime(htmlcode).strip(','), + 'actor': actor.strip(','), + 'release': getRelease(htmlcode).strip(','), + 'number': getNum(htmlcode).strip(','), + 'cover': getCover(htmlcode).strip(','), + 'extrafanart': getExtraFanart(htmlcode).strip(','), 'imagecut': 0, 'tag': getTag(htmlcode).strip(','), 'series': getSeries(htmlcode).strip(','), - 'year': getYear(getRelease(htmlcode)), + 'year': getYear(getRelease(htmlcode)).strip(','), 'actor_photo': getActorPhoto(actor.split(',')), 'director': '', 'website': 'https://www.mgstage.com/product/product_detail/' + str(number) + '/', diff --git a/Ui/AVDC.py b/Ui/AVDC.py index e22da93cb..09b3d1377 100644 --- a/Ui/AVDC.py +++ b/Ui/AVDC.py @@ -780,7 +780,7 @@ def setupUi(self, AVDV): def retranslateUi(self, AVDV): _translate = QtCore.QCoreApplication.translate - AVDV.setWindowTitle(_translate("AVDV", "AVDC-3.96")) + AVDV.setWindowTitle(_translate("AVDV", "AVDC-3.961")) self.pushButton_start_cap.setText(_translate("AVDV", "开始")) self.textBrowser_warning.setHtml(_translate("AVDV", "\n" "