Bay = [] for coord in bay : lon, lat = coord.split(",") Bay.append(Coordinates(float(lat), float(lon))) Field = Area(Bay) Field.__start_point__() caters = ["MOLODIZGNIY", "ADMIRAL LAZAREV", "SATURN", "ADMIRAL ISTOMIN", "V ADMIRAL KLOKACHEV", "NORD"] Caters = [] for c in caters: Caters.append(Ship(c)) Scrap = Scrapper() for cater in Caters : res = Scrap.scrape_ship(cater.name) if res == None: print cater.name, "Not found" else: v, cors, point = res print cater.name, "\t---\t", Field.__das_is_in__(point) print point print #print #for x in Field.points: # print x.latitude, x.longitude
def update_from_ais(self): scrapper = Scrapper() data = scrapper.scrape_ship(self.name) return self.update(data)