def get_images_path(): img_dir = cf.get('images_path') if cf.get('images_path') else os.path.join(str(Path.home()), 'weibospider', 'images') if not os.path.exists(img_dir): os.makedirs(img_dir) return img_dir