2.3-修复out of range 的bug
This commit is contained in:
parent
cab36be6a2
commit
123b2f4cfc
41
fanza.py
41
fanza.py
@ -82,24 +82,29 @@ def main(number):
|
|||||||
if '404 Not Found' in htmlcode:
|
if '404 Not Found' in htmlcode:
|
||||||
htmlcode=get_html('https://www.dmm.co.jp/mono/dvd/-/detail/=/cid='+number)
|
htmlcode=get_html('https://www.dmm.co.jp/mono/dvd/-/detail/=/cid='+number)
|
||||||
url = 'https://www.dmm.co.jp/mono/dvd/-/detail/=/cid='+number
|
url = 'https://www.dmm.co.jp/mono/dvd/-/detail/=/cid='+number
|
||||||
dic = {
|
try:
|
||||||
'title': getTitle(htmlcode).strip(getActor(htmlcode)),
|
dic = {
|
||||||
'studio': getStudio(htmlcode),
|
'title': getTitle(htmlcode).strip(getActor(htmlcode)),
|
||||||
'outline': getOutline(htmlcode),
|
'studio': getStudio(htmlcode),
|
||||||
'runtime': getRuntime(htmlcode),
|
'outline': getOutline(htmlcode),
|
||||||
'director': getDirector(htmlcode),
|
'runtime': getRuntime(htmlcode),
|
||||||
'actor': getActor(htmlcode),
|
'director': getDirector(htmlcode),
|
||||||
'release': getRelease(htmlcode),
|
'actor': getActor(htmlcode),
|
||||||
'number': getNum(htmlcode),
|
'release': getRelease(htmlcode),
|
||||||
'cover': getCover(htmlcode,number),
|
'number': getNum(htmlcode),
|
||||||
'imagecut': 1,
|
'cover': getCover(htmlcode,number),
|
||||||
'tag': getTag(htmlcode),
|
'imagecut': 1,
|
||||||
'label':getLabel(htmlcode),
|
'tag': getTag(htmlcode),
|
||||||
'year': getYear(getRelease(htmlcode)), # str(re.search('\d{4}',getRelease(a)).group()),
|
'label':getLabel(htmlcode),
|
||||||
'actor_photo': '',
|
'year': getYear(getRelease(htmlcode)), # str(re.search('\d{4}',getRelease(a)).group()),
|
||||||
'website': url,
|
'actor_photo': '',
|
||||||
'source': 'siro.py',
|
'website': url,
|
||||||
}
|
'source': 'siro.py',
|
||||||
|
}
|
||||||
|
except :
|
||||||
|
dic = {
|
||||||
|
'title': '',
|
||||||
|
}
|
||||||
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':')) # .encode('UTF-8')
|
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':')) # .encode('UTF-8')
|
||||||
return js
|
return js
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user