maxCopell / tripadvisor-scraper

Scrape Tripadvisor restaurant, hotels, and places.
https://apify.com/maxcopell/tripadvisor
47 stars 29 forks source link

Error with hotelId or restaurantId #70

Closed iesta closed 2 years ago

iesta commented 2 years ago

``I keep getting this error when trying to fetch data from a single hotel or restaurant.

2021-12-16T21:08:43.851Z ERROR BasicCrawler: handleRequestFunction failed, reclaiming failed request back to the list or queue {"url":"https://www.tripadvisor.com","retryCount":2,"id":"nMLwWw9hmTQOlju"} 2021-12-16T21:08:43.854Z TypeError: Cannot destructure property 'location_id' of 'placeInfo' as it is undefined. 2021-12-16T21:08:43.856Z at processHotel (/usr/src/app/src/tools/hotel-tools.js:20:26)

Json template i use ($val are replaced):

{ "maxItems": 1, "includeRestaurants": true, "includeHotels": false, "includeAttractions": false, "includeTags": false, "includeReviews": true, "maxReviews": $max, "lastReviewDate": "2018-01-01", "locationId": "$id", "restaurantId": "$url", "language": "en", "currency": "USD", "proxyConfiguration": { "useApifyProxy": true }, "debugLog": false }

zpelechova commented 2 years ago

Hey, can you sent a link for the run iteself? I wonder what format these fiealds are: "locationId": "$id", "restaurantId": "$url"

iesta commented 2 years ago

{ "maxItems": 1, "includeRestaurants": false, "includeHotels": true, "includeAttractions": false, "includeTags": false, "includeReviews": true, "maxReviews": 200, "lastReviewDate": "2018-01-01", "locationId": "60763", "location_id": "60763", "hotelId": "93575", "language": "en", "currency": "USD", "proxyConfiguration": { "useApifyProxy": true }, "debugLog": false }

iesta commented 2 years ago

https://console.apify.com/view/runs/TR1sRG30gxmvg8OFI