import scrapy
class MyCouponSpyder(scrapy.Spider):
name = "toscrap-coupon"
start_urls = ["https://www.groupon.com/coupons/stores/macys.com?c=058fc9a8-01a8-4ff4-b714-dc6dcbc5624f"]
def parse(self,response):
for reviews in response.xpath("//div[@class='modal show-modal']"):
yield {
'week_menu':reviews.xpath(".//h2[@class='title']/text()").extract_first(),
}