import scrapy
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.contrib.spiders import CrawlSpider, Rule
from goodreads.items import GrItem

# Good Reads quote spider 
class GrSpider(CrawlSpider):
	name = "gr"
	allowed_domains = ["goodreads.com"]
	start_urls = [
		"https://www.goodreads.com/quotes/tag/love"
	]
	#recursively go through all pages with quotes
	rules = (Rule (SgmlLinkExtractor(allow=('/quotes/tag/love?page',))
	, callback="parse", follow= True),
    	)

	def parse(self, response):
		item = GrItem() 
		#doesn't pick up full quote for quote split in between br
		item['quotes'] = list()
		for res in response.xpath("//div[@class=\"quoteText\"]"):
			res = res.xpath('normalize-space(./text())').extract()[0].encode('ascii', "replace")[1:-1]
			item['quotes'].append(res)
		item['link'] = response.xpath('//a[@class=\"next_page\"]/@href').extract()
		yield item

4d40eec777719eea8cbe3943b69748ebd2fa0a79
<mask token>


class GrSpider(CrawlSpider):
    <mask token>
    <mask token>
    <mask token>
    <mask token>
    <mask token>

<mask token>


class GrSpider(CrawlSpider):
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def parse(self, response):
        item = GrItem()
        item['quotes'] = list()
        for res in response.xpath('//div[@class="quoteText"]'):
            res = res.xpath('normalize-space(./text())').extract()[0].encode(
                'ascii', 'replace')[1:-1]
            item['quotes'].append(res)
        item['link'] = response.xpath('//a[@class="next_page"]/@href').extract(
            )
        yield item

<mask token>


class GrSpider(CrawlSpider):
    name = 'gr'
    allowed_domains = ['goodreads.com']
    start_urls = ['https://www.goodreads.com/quotes/tag/love']
    rules = Rule(SgmlLinkExtractor(allow=('/quotes/tag/love?page',)),
        callback='parse', follow=True),

    def parse(self, response):
        item = GrItem()
        item['quotes'] = list()
        for res in response.xpath('//div[@class="quoteText"]'):
            res = res.xpath('normalize-space(./text())').extract()[0].encode(
                'ascii', 'replace')[1:-1]
            item['quotes'].append(res)
        item['link'] = response.xpath('//a[@class="next_page"]/@href').extract(
            )
        yield item

import scrapy
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.contrib.spiders import CrawlSpider, Rule
from goodreads.items import GrItem


class GrSpider(CrawlSpider):
    name = 'gr'
    allowed_domains = ['goodreads.com']
    start_urls = ['https://www.goodreads.com/quotes/tag/love']
    rules = Rule(SgmlLinkExtractor(allow=('/quotes/tag/love?page',)),
        callback='parse', follow=True),

    def parse(self, response):
        item = GrItem()
        item['quotes'] = list()
        for res in response.xpath('//div[@class="quoteText"]'):
            res = res.xpath('normalize-space(./text())').extract()[0].encode(
                'ascii', 'replace')[1:-1]
            item['quotes'].append(res)
        item['link'] = response.xpath('//a[@class="next_page"]/@href').extract(
            )
        yield item

import scrapy
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.contrib.spiders import CrawlSpider, Rule
from goodreads.items import GrItem

# Good Reads quote spider 
class GrSpider(CrawlSpider):
	name = "gr"
	allowed_domains = ["goodreads.com"]
	start_urls = [
		"https://www.goodreads.com/quotes/tag/love"
	]
	#recursively go through all pages with quotes
	rules = (Rule (SgmlLinkExtractor(allow=('/quotes/tag/love?page',))
	, callback="parse", follow= True),
    	)

	def parse(self, response):
		item = GrItem() 
		#doesn't pick up full quote for quote split in between br
		item['quotes'] = list()
		for res in response.xpath("//div[@class=\"quoteText\"]"):
			res = res.xpath('normalize-space(./text())').extract()[0].encode('ascii', "replace")[1:-1]
			item['quotes'].append(res)
		item['link'] = response.xpath('//a[@class=\"next_page\"]/@href').extract()
		yield item
