-
Notifications
You must be signed in to change notification settings - Fork 49
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
TypeError: 'NoneType' object is not iterable #2
Comments
I have the same issue! It used to work fine (a few weeks ago) but I see the same error right now. Would you great if anybody can help fixing this? |
Looks like Amazon has begun blocking these requests. The Robots.txt file shows the customer reviews are Disallowed. They appear to be pushing folks to the Product Advertising API which requires you to be a seller or have a e-commerce site to pull the data. Hopefully I'm wrong, but based on the information that came back on the query it appears that is what is going on.
|
Definitely getting blocked here. You may want to change the User-Agent |
In reviews.py if we add one more condition in if then It will work fine because if verified purchase is blank(None) then it will show error. If we add a condition in if block to check that, the error will be solve.
You can see I add one more condition in first If and also add a else for outer If. |
I installed all the requirements and ran the code for testing without changing the urls or anything and got the following error:
Downloading https://www.amazon.com/Nike-Womens-Reax-Running-Shoes/product-reviews/B07ZPL752N/ref=cm_cr_dp_d_show_all_btm?ie=UTF8&reviewerType=all_reviews
Traceback (most recent call last):
File "C:/Users/amazon-review-scraper-master/reviews.py", line 46, in
for r in data['reviews']:
TypeError: 'NoneType' object is not iterable
Could you tell me where the code might need to be changed or what I should do?
The text was updated successfully, but these errors were encountered: