andorfermichael / tripadvisor-scraper

Scrape the hotel reviews of a whole city on TripAdvisor
35 stars 14 forks source link

Getting an Indexerror on all scrapes #1

Closed spencerbell closed 4 years ago

spencerbell commented 4 years ago

Getting this error for all of my scrapes.

Traceback (most recent call last):
  File "tripadvisor-scrapper.py", line 716, in <module>
    city_hotel_urls = parse_hotel_urls_of_city(BASE_URL, city_pagination_urls, headers)
  File "tripadvisor-scrapper.py", line 113, in parse_hotel_urls_of_city
    hotel_urls.append(base_url + soup.find_all('a', attrs={'class': 'property_title '})[j]['href'][1:])
IndexError: list index out of range
j-takurou commented 4 years ago

I found out the reason. Let me send a Pull request later! It's just a typo as long as I tried.

andorfermichael commented 4 years ago

I am not maintaining this project. However, I appreciate your interest and your work on it. Thank you.