def __init__(self, *args, **kwargs): self.out_path = result_path(self.result_path_type, self.name) if not os.path.exists(self.out_path): os.makedirs(self.out_path) self.physician_csv = self.out_path + self.name + '_physician.csv' self.specialty_csv = self.out_path + self.name + '_specialty.csv' self.location_csv = self.out_path + self.name + '_location.csv' super(BrandenburgSpider, self).__init__(site_name=self.allowed_domains[0], *args, **kwargs) self.current_page = 0
def __init__(self, *args, **kwargs): sys.path.append(os.path.abspath(os.path.join('../../../..', 'half1'))) import resultpath self.out_path = resultpath.result_path(self.result_path_type, self.name) if not os.path.exists(self.out_path): os.makedirs(self.out_path) self.physician_csv = self.out_path + self.name + '_physician.csv' self.specialty_csv = self.out_path + self.name + '_specialty.csv' self.location_csv = self.out_path + self.name + '_location.csv' super(BremenSpider, self).__init__(site_name=self.allowed_domains[0], *args, **kwargs) self.current_page = 0