def __init__(self, iata_code): self.records = Timetable(iata_code) self.iata_code = iata_code self.name = find_airport_name(iata_code) self.metadata = { 'status': None, 'iata_code': iata_code, 'name': self.name, 'flights': self.records } self.request_headers['User-Agent'] = _agents[randint(0, len(_agents) - 1)]
def __init__(self, iata_code): self.records = Timetable(iata_code) self.iata_code = iata_code self.name = find_airport_name(iata_code) self.metadata = { 'status': None, 'iata_code': iata_code, 'name': self.name, 'flights': self.records } self.request_headers['User-Agent'] = _agents[randint( 0, len(_agents) - 1)]
def __init__(self, iata_code, *args, **kwargs): self.iata_code = iata_code self.flights = [] self.name = find_airport_name(iata_code) self.time_retrieved = datetime.now().replace(microsecond=0) super(Timetable, self).__init__(*args, **kwargs)