Skip to content

Commit

Permalink
V3.961
Browse files Browse the repository at this point in the history
修复JAVDB封面链接为空的问题。
  • Loading branch information
moyy996 committed Jul 23, 2020
1 parent 3b83e94 commit 0cd9fdc
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion AVDC_Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 # 批量刮削次数
Expand Down
2 changes: 1 addition & 1 deletion Function/Function.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions Getter/javdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 12 additions & 12 deletions Getter/mgstage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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) + '/',
Expand Down
2 changes: 1 addition & 1 deletion Ui/AVDC.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
Expand Down
2 changes: 1 addition & 1 deletion Ui/AVDC.ui
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</rect>
</property>
<property name="windowTitle">
<string>AVDC-3.96</string>
<string>AVDC-3.961</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QStackedWidget" name="stackedWidget">
Expand Down
4 changes: 2 additions & 2 deletions update_check.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "3.96",
"version_show":"3.96",
"version": "3.961",
"version_show":"3.961",
"download": "https://github.com/moyy996/AVDC/releases"
}

0 comments on commit 0cd9fdc

Please sign in to comment.