Advertisement
Guest User

123

a guest
Sep 18th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. class AmazonSpiderSpider(scrapy.Spider):
  2. name = 'amazon'
  3. start_urls = [
  4. 'https://www.riverisland.com/c/men/coats-and-jackets?icid=mu/men/coats--jackets'
  5. ]
  6.  
  7. def parse(self, response):
  8. item = AmazontutorialItem()
  9.  
  10. for product in response.css('.MainLoader__productListing___1ZaKr>a'):
  11. item['product_name'] = product.css('.p-name::text').get()
  12. item['product_price'] = response.css('.p-price::text').get().replace(u'€\xa0', u'')
  13. item['product_imagelink'] = response.css('.u-photo::attr(src)').get()
  14. yield item
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement