adamlwgriffiths / amazon_scraper

Provides content not accessible through the standard Amazon API
Other
234 stars 60 forks source link

Reviews API broken? #14

Closed bnantz closed 8 years ago

bnantz commented 9 years ago

I don't know if this is an issue, but I can't get the reviews API to work. Even if I use the values in your unit tests they do not work. Do the unit tests work for you? Here are the results: Fitbit FB401BK Flex Wireless Activity + Sleep Wristband, Black, Small - 5.5" - 6 .5" & Large - 6.5" - 7.9" [0, 0, 0, 0, 0] built-in method title of unicode object at 0x0000000004CEAED0> built-in method title of unicode object at 0x0000000004D66600> built-in method title of unicode object at 0x0000000004D8BCC0> built-in method title of unicode object at 0x0000000004DB53C0> built-in method title of unicode object at 0x0000000004E24A80> built-in method title of unicode object at 0x0000000004E4C180> built-in method title of unicode object at 0x0000000004E77870> built-in method title of unicode object at 0x0000000004E9CF30> built-in method title of unicode object at 0x0000000004F10630> built-in method title of unicode object at 0x0000000004F76CF0> Traceback (most recent call last): File "test.py", line 11, in for r in rs: File "build\bdist.win-amd64\egg\amazon_scraper\reviews.py", line 180, in ite r TypeError: init() takes at least 2 arguments (2 given)

hahnicity commented 9 years ago

What are you doing? Are you running the unit tests or are you trying to do something else

adamlwgriffiths commented 9 years ago

Also, provide the version you are using.

bnantz commented 9 years ago

Thanks for the prompt response! I wasn't sure this was the best way to report the issue? Anyway, I downloaded the master zip file (https://github.com/adamlwgriffiths/amazon_scraper/archive/master.zip) and installed using the setup.py. BTW, there is an error on line 4 (del os.link) of the setup.py on my windows 7 laptop (work issued :( ).

I am not running the unit tests but suspect they wouldn't work. Here is the code I am running:

from amazon_scraper import AmazonScraper amzn = AmazonScraper("put your access key", "secret key", "and associate tag here")

p = amzn.lookup(ItemId='B00BGO0Q9O') print(p.title) print(p.ratings)

rs = amzn.reviews(URL=p.reviews_url) for r in rs: print(r.title)

adamlwgriffiths commented 9 years ago

Sorry, I didn't realise you mentioned 'master' in your response (I was waiting to hear what version you were using, my bad). Strange errors. Are you using Python 3?

adamlwgriffiths commented 9 years ago

The error at the end should be fixed by #15. Not sure on the method printing.

adamlwgriffiths commented 9 years ago

Ok, I've needed to use the library again and I'm finding that its in a totally broken state. Iterating a review page returns ids (this has been there for a long time to avoid downloading reviews) Subreviews aren't parsing on a number of pages. Iteration is broken in some methods. Ratings for SubReviews is broken (attempt to cast '5.0 out of 5 stars' to an int). No conversion method from SubReview to full Review.

I'm looking into this, hold tight.

adamlwgriffiths commented 9 years ago

Bugs should be fixed in 6df73f6047351b019ed20f458d5605cd20cd7099 Python 3 is still unresolved. The only issues I can see are the changes Amazon have made to ratings (#17).

adamlwgriffiths commented 9 years ago

Python 3 should be supported as of 0.3.1 See this 265bfacf2430894829e1d47c61a9b4f690af3816 for changes