Skip to content Skip to sidebar Skip to footer

Empty List Returning By Xpath In Scrapy

I am working on scrapy , i am trying to gather some data from a site , Spider Code class NaaptolSpider(BaseSpider): name = 'naaptol' domain_name = 'www.naaptol.com' st

Solution 1:

The response is in JSON format:

{
  "prodList": [
    {
      "pid": "955492",
      "pnm": "Samsung Star 3 Duos",
      "mctid": "27",
      "pc": "5,650",
      "mrp": "6290",
      "pdc": "10",
      "pimg": "Samsung-Star-3-duos-1.jpg",
      "rt": "8",
      "prc": "1",
      "per": "Y",
      (...)
    },
    (...)
}

In order to parse it, you can use python's json module. An example of what you are trying to achieve is here: Empty list for hrefs to achieve pagination through JavaScript onclick functions.

Post a Comment for "Empty List Returning By Xpath In Scrapy"