Skip to content

Commit

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

for date in self._dates:
for date in self._date:
rep += "{d}: {org} --> {dest}".format(
d = date,
org = self._origin,
Expand Down Expand Up @@ -219,7 +219,7 @@ def dest(self, x : str) -> None:

@property
def date(self):
return self.date
return self._date

@date.setter
def date(self, x : str) -> None:
Expand Down Expand Up @@ -250,7 +250,7 @@ def _scrape_data(self, driver):

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

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

'''if self._date_return is not None:
leave_result = self._get_results(self._url[0], driver)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
def func_0():
return True

res1 = pd.read_csv('tests/test_data/test1.csv')
res1 = Scrape("LGA", "RDU", "2023-05-15", "2023-06-15")
res1.data = pd.read_csv('tests/test_data/test1.csv')

res2 = pd.read_csv('tests/test_data/test2.csv')
res2 = Scrape("IST", "CDG", "2023-07-15", "2023-07-20",)
res2.data = pd.read_csv('tests/test_data/test2.csv')

os.system('rm tests/test_data/LGA-RDU.csv')
os.system('rm tests/test_data/CDG-IST.csv')
Expand Down

0 comments on commit 77fde3a

Please sign in to comment.