add a try catch logic for fc2fans_club.py

This commit is contained in:
jnozsc 2020-02-17 21:45:13 -08:00
parent 690557f878
commit 53fe85e607

View File

@ -104,6 +104,7 @@ def getYear_fc2com(release):
return ''
def main(number):
try:
htmlcode2 = ADC_function.get_html('https://adult.contents.fc2.com/article/'+number+'/')
htmlcode = ADC_function.get_html('https://fc2club.com//html/FC2-' + number + '.html')
actor = getActor(htmlcode)
@ -150,6 +151,10 @@ def main(number):
'website': 'http://adult.contents.fc2.com/article/' + number + '/',
'source': 'http://adult.contents.fc2.com/article/' + number + '/',
}
except Exception as e:
# (TODO) better handle this
# print(e)
dic = {"title": ""}
js = json.dumps(dic, ensure_ascii=False, sort_keys=True, indent=4, separators=(',', ':'),)#.encode('UTF-8')
return js