Merge pull request #122 from jnozsc/fix-fanza-hinban-issue

2.7 Update (future)
This commit is contained in:
Yoshiko 2020-02-17 15:59:36 +08:00 committed by GitHub
commit d647ddfe07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,7 +82,15 @@ def main(number):
if '404 Not Found' in htmlcode:
htmlcode=get_html('https://www.dmm.co.jp/mono/dvd/-/detail/=/cid='+number)
url = 'https://www.dmm.co.jp/mono/dvd/-/detail/=/cid='+number
if '404 Not Found' in htmlcode:
# neither digital nor mono is available
return json.dumps({'title': '',})
try:
# for some old page, the input number does not match the page
# for example, the url will be cid=test012
# but the hinban on the page is test00012
# so get the hinban first, and then pass it to following functions
number = getNum(htmlcode)
dic = {
'title': getTitle(htmlcode).strip(getActor(htmlcode)),
'studio': getStudio(htmlcode),
@ -91,15 +99,15 @@ def main(number):
'director': getDirector(htmlcode),
'actor': getActor(htmlcode),
'release': getRelease(htmlcode),
'number': getNum(htmlcode),
'cover': getCover(htmlcode,number),
'number': number,
'cover': getCover(htmlcode, number),
'imagecut': 1,
'tag': getTag(htmlcode),
'label':getLabel(htmlcode),
'year': getYear(getRelease(htmlcode)), # str(re.search('\d{4}',getRelease(a)).group()),
'actor_photo': '',
'website': url,
'source': 'siro.py',
'source': 'fanza.py',
}
except :
dic = {