normalize-space/strip item.xpath('normalize-space(./div[@class="tags"])') item.xpath('./div[@class="tags"]').strip()