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

Bugged #68

Open
pvde89 opened this issue Oct 15, 2023 · 6 comments
Open

Bugged #68

pvde89 opened this issue Oct 15, 2023 · 6 comments

Comments

@pvde89
Copy link

pvde89 commented Oct 15, 2023

/Documents/GitHub/BookingScraper/booking.py' && echo Exit status: $? && exit 1
Traceback (most recent call last):
File "/Documents/GitHub/BookingScraper/booking.py", line 214, in
get_data(args.rooms, args.country, args.out_format, args.startdate, args.enddate)
File "/Documents/GitHub/BookingScraper/booking.py", line 152, in get_data
hotels_list: list = prep_data(rooms, country, out_format, start_date, end_date)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/pascal/Documents/GitHub/BookingScraper/booking.py", line 122, in prep_data
parsed_html.find_all("li", {"class": "sr_pagination_item"})[-1]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
IndexError: list index out of range

@smama65
Copy link

smama65 commented Oct 16, 2023

Dear @ZoranPandovski , I have this problem too. Can you help us?

@ZoranPandovski
Copy link
Owner

I haven't checked this repo for a year. Can you please provide more info or steps to reproduce this?

@smama65
Copy link

smama65 commented Oct 16, 2023

Dear @ZoranPandovski, thank you for your reply. When I run booking.py file, the following error occurs

image

I think the code cannot extract any hotel information.

@pvde89
Copy link
Author

pvde89 commented Oct 16, 2023

It shouldn't be too difficult. As far as I noticed, Booking mainly changed their classes.

I'm trying to locate all occurrences of the specific site and XML elements that were used before and comparing it within their current pages.

@smama65
Copy link

smama65 commented Oct 25, 2023

Dear @ZoranPandovski. Do you update the repository?

@divyakhatiyan
Copy link

divyakhatiyan commented Oct 11, 2024

@ZoranPandovski Error "IndexError: list index out of range" is coming up while finding for this class: "sr_pagination_item" in the parsed html around line 134 in booking.py

Now just trying to understand, the reason for searching this class, do i need to change the url as well. Any pointer will be highly appreciated.

all_offset = (
    parsed_html.find_all("li", {"class": "sr_pagination_item"})[-1]
    .get_text()
    .splitlines()[-1]
)

11 10 2024_23 00 56_REC

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