Skip to content
Advertisement

Scrapy – Request Payload format and types for AJAX based websites

I am trying to scrape the noon.com. Here is the product which I am interested to scrape https://www.noon.com/uae-en/face-and-beard-wash-multicolour-80ml/N22130693A/p?o=f7adb85c3296590b.

I am able to get all information of product except Ratings/Review data. Issue here is that website is loading the Ratings data through API link https://www.noon.com/_svc/reviews/fetch/v1/product-reviews/list, which is basically POST request method.

I tried with including headers and appropriate payload in the scrapy request. But I am getting 400, 405 — HTTP status code is not handled or not allowed as response.

This is how I am trying to pull Ratings data

JavaScript

Any solution for this issue ? Any help would be appreciated.

Advertisement

Answer

I tried this and it works for me, if it doesn’t work for you maybe you’ve been IP blocked and may have to use a proxy api. Try if this works for you.

JavaScript

My output:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement