2.3-修复out of range 的bug

This commit is contained in:
mo_yy 2020-01-29 14:29:13 +08:00
parent cab36be6a2
commit 123b2f4cfc

View File

@ -82,6 +82,7 @@ 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
try:
dic = {
'title': getTitle(htmlcode).strip(getActor(htmlcode)),
'studio': getStudio(htmlcode),
@ -100,6 +101,10 @@ def main(number):
'website': url,
'source': 'siro.py',
}
except :
dic = {
'title': '',
}
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':')) # .encode('UTF-8')
return js