Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class AmazonSpiderSpider(scrapy.Spider):
- name = 'amazon'
- start_urls = [
- 'https://www.riverisland.com/c/men/coats-and-jackets?icid=mu/men/coats--jackets'
- ]
- def parse(self, response):
- item = AmazontutorialItem()
- for product in response.css('.MainLoader__productListing___1ZaKr>a'):
- item['product_name'] = product.css('.p-name::text').get()
- item['product_price'] = response.css('.p-price::text').get().replace(u'€\xa0', u'')
- item['product_imagelink'] = response.css('.u-photo::attr(src)').get()
- yield item
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement