Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The price is set to '0' for all flights. #16

Open
diogoduartec opened this issue Oct 1, 2024 · 3 comments
Open

The price is set to '0' for all flights. #16

diogoduartec opened this issue Oct 1, 2024 · 3 comments

Comments

@diogoduartec
Copy link

Code built based on the Readme example:

import json
from dataclasses import asdict
from fast_flights import FlightData, Passengers, create_filter, get_flights, Cookies

# Create a new filter
filter = create_filter(
    flight_data=[
        FlightData(
            date="2024-12-30",
            from_airport="MAO",
            to_airport="SDU"
        ),
    ],
    trip="one-way",
    seat="economy",
    passengers=Passengers(
        adults=1,
        children=0,
        infants_in_seat=0,
        infants_on_lap=0
    )
)

# Get flights with a filter
result = get_flights(filter)
print(result)
with open('result.json', 'w') as f:
    json.dump(asdict(result), f, indent=4)

The result price for all flights is '0':
image

@jack-ireland
Copy link

I had the same issue

When I pulled the library this bug was still in place:
https://github.com/AWeirdDev/flights/pull/7/files

I applied the change locally and the issue was fixed

@AWeirdDev
Copy link
Owner

Yeah, the price thingy just doesn't work even with the pull somehow, I'm looking for ways to fix it (if I have time).

Does anyone here know how to deal with Google's internal APIs? That'd be cool.

@MohamedLashuel
Copy link

Pulling the repository works for me as well while it looks like the pip version is still behind with the bug fix mentioned by jack-ireland. It would be great if the pip version were updated as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants