-
Notifications
You must be signed in to change notification settings - Fork 46
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
Getting an error: "NoSuchElementException" for "things to do" scraper #14
Comments
Hello @Ema8899 I took a look at the script's default site, which is this: https://www.tripadvisor.com/Hotel_Review-g60763-d1218720-Reviews-The_Standard_High_Line-New_York_City_New_York.html and the element actually exists. Can you please link the website with which you gave the error? Happy 2022 to you too :) |
@giuseppegambino: thanks for your prompt reply! Here is the link of the attraction: Just to be sure, I have tried the code just now and it keeps giving me the error I mentioned above. Thanks again for your help! |
They changed again the webpages :(( I am noticing that now there is not only the difference between restaurants and everything else (which I had called things_to_do), but there is the "hotels" section, so now there are 3 (or at least those counted by me) site structures on tripadvisor: restaurants, hotels and tourist attractions. Fortunately, but not for you, the hotel pages retain the structure of the old "things to do", instead the tourist attractions have different html / css fields .. so I have to work on it a bit .. As soon as I have some free time, I immediately get to work! Thanks for the update @Ema8899 |
Thank you @giuseppegambino Have a good day! |
Hi @giuseppegambino have you perhaps had a chance to update this to cater for Hotels? |
Hi @giuseppegambino I'm really excited to work with this script. I don't know if you've had time to look at the new CSS/HTML, but was wondering if there had been any updates to the 'Attractions' script. When I run it I get the following error (similar but distinct from the person above):
I was just wondering since this is for the dates element if there might be a way for me to find the xpath on the Chrome site itself by inspecting it--I tried but no luck yet. |
Hello @giuseppegambino!
I was trying your code (thanks a lot for publishing it), and while the code to scrape restaurants' reviews works, the code to scrape reviews for "things to do" does not work. I get this message when I run it:
NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":".//div[contains(@data-test-target, 'expand-review')]"}
Would it be possible for you to fix it? It would be extremely helpful. Thanks a lot and happy 2022!
The text was updated successfully, but these errors were encountered: