I've tried to install a scraper that will reflect the price of airline tickets from this GitHub page: https://kcelebi.github.io/flight-analysis/
Following the authors' steps I downloaded the code and run pip install google-flight-analysis
into my command prompt which didn't seem to have any issues installing everything.
I then took the Authors' code used to run the program and pasted it into Visual Studio, the code is as follows:
# Scrapes Google Flights for round-trip JFK to IST, leave July 15, 2023, return July 25, 2023.
result = Scrape("JFK", "IST", "2023-07-15", "2023-07-25")
# Obtain data + info
flights = result.data # outputs as a Pandas dataframe
origin = result.origin # "JFK"
dest = result.dest # "IST"
date_leave = result.date_leave # "2023-07-15"
date_return = result.date_return # "2023-07-25"
I then ran the code in Visual Studio to which it returns:
Traceback (most recent call last):
File "C:\Users\jorda\AppData\Local\Temp\tempCodeRunnerFile.python", line 10, in <module>
date_leave = result.date_leave # "2023-07-15"
^^^^^^^^^^^^^^^^^
AttributeError: '_Scrape' object has no attribute 'date_leave'
I would appreciate any help further in fixing my problem. I'm almost convinced I need to entirely uninstall python and all of the additions to in and re-install because I certainly could've messed up along the way (I have no experience in Python).