Merge pull request #128 from jnozsc/fix_fc2fans_club
add a try catch logic for fc2fans_club.py
This commit is contained in:
		
						commit
						a989382888
					
				| @ -104,6 +104,7 @@ def getYear_fc2com(release): | |||||||
|         return '' |         return '' | ||||||
| 
 | 
 | ||||||
| def main(number): | def main(number): | ||||||
|  |     try: | ||||||
|         htmlcode2 = ADC_function.get_html('https://adult.contents.fc2.com/article/'+number+'/') |         htmlcode2 = ADC_function.get_html('https://adult.contents.fc2.com/article/'+number+'/') | ||||||
|         htmlcode = ADC_function.get_html('https://fc2club.com//html/FC2-' + number + '.html') |         htmlcode = ADC_function.get_html('https://fc2club.com//html/FC2-' + number + '.html') | ||||||
|         actor = getActor(htmlcode) |         actor = getActor(htmlcode) | ||||||
| @ -150,6 +151,10 @@ def main(number): | |||||||
|                 'website': 'http://adult.contents.fc2.com/article/' + number + '/', |                 'website': 'http://adult.contents.fc2.com/article/' + number + '/', | ||||||
|                 'source': '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') |     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