Skip to content

Commit

Permalink
More bug fixes, typos
Browse files Browse the repository at this point in the history
  • Loading branch information
kcelebi committed May 26, 2023
1 parent c8aafaa commit e8d45dc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/google_flight_analysis/scrape.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ def __repr__(self):
else:
rep += "{n} RESULTS FOR:\n".format(n = self._data.shape[0])

for date in self._date:
for i, date in enumerate(self._date):
rep += "{d}: {org} --> {dest}\n".format(
d = date,
org = self._origin,
dest = self._dest
org = self._origin[i],
dest = self._dest[i]
)

rep += ")"
Expand Down Expand Up @@ -126,7 +126,7 @@ def _set_properties(self, *args):
assert len(args[1]) == 3 and type(args[1]) == str, "Issue with arg 1, see docs"
assert len(args[2]) == 10 and type(args[2]) == str, "Issue with arg 2, see docs"

self._origin, self._dest, self._date = [args[0], args[1], args[2]]
self._origin, self._dest, self._date = [args[0]], [args[1]], [args[2]]

#assert len(self._origin) == len(self._dest) == len(self._date), "Issue with array lengths, talk to dev"
self._url = self._make_url()
Expand Down Expand Up @@ -250,7 +250,7 @@ def _scrape_data(self, driver):

results = [self._get_results(url, self._date[i], driver) for i, url in enumerate(self._url)]

self._data = pd.concat(result, ignore_index = True)
self._data = pd.concat(results, ignore_index = True)

'''if self._date_return is not None:
leave_result = self._get_results(self._url[0], driver)
Expand Down

0 comments on commit e8d45dc

Please sign in to comment.