import scrapy


class DataScienceJobsSpider(scrapy.Spider):
    name = "data-science-jobs"
    allowed_domains = ["www.data-science-jobs.com"]
    start_urls = (
        'http://www.data-science-jobs.com/',
    )

    def parse(self, response):
        pass


from logging import getLogger
from scrapy.spiders import Rule, CrawlSpider
from scrapy.linkextractors import LinkExtractor


class DataScienceJobsSpider(CrawlSpider):
    log = getLogger(__name__)
    name = 'data-science-jobs'
    allowed_domains = ['www.data-science-jobs.com', 'fonts.googleapis.com', 'jobs.lever.com']
    start_urls = ['http://www.data-science-jobs.com/']
    test = Rule(LinkExtractor(allow='family'), callback='parse')
    test2 = Rule(LinkExtractor(allow='comtravo'), callback='parse')
    job_links = Rule(LinkExtractor(allow='detail\/'), callback='parse')
    pagination_links = Rule(LinkExtractor(allow='\?page=\d+'), callback='parse')
    rules = [job_links, pagination_links, test, test2]
    response = None

    def parse(self, response):
        self.log.info('Parsing %s', response.url)

Add more rules for test purposes.
Add more rules for test purposes.

- import scrapy
+ 
+ from logging import getLogger
+ from scrapy.spiders import Rule, CrawlSpider
+ from scrapy.linkextractors import LinkExtractor
  
  
- class DataScienceJobsSpider(scrapy.Spider):
+ class DataScienceJobsSpider(CrawlSpider):
+     log = getLogger(__name__)
-     name = "data-science-jobs"
+     name = 'data-science-jobs'
+     allowed_domains = ['www.data-science-jobs.com', 'fonts.googleapis.com', 'jobs.lever.com']
-     allowed_domains = ["www.data-science-jobs.com"]
-     start_urls = (
-         'http://www.data-science-jobs.com/',
+     start_urls = ['http://www.data-science-jobs.com/']
-     )
+     test = Rule(LinkExtractor(allow='family'), callback='parse')
+     test2 = Rule(LinkExtractor(allow='comtravo'), callback='parse')
+     job_links = Rule(LinkExtractor(allow='detail\/'), callback='parse')
+     pagination_links = Rule(LinkExtractor(allow='\?page=\d+'), callback='parse')
+     rules = [job_links, pagination_links, test, test2]
+     response = None
  
      def parse(self, response):
-         pass
+         self.log.info('Parsing %s', response.url)
  
Add more rules for test purposes.
## Code Before:
import scrapy


class DataScienceJobsSpider(scrapy.Spider):
    name = "data-science-jobs"
    allowed_domains = ["www.data-science-jobs.com"]
    start_urls = (
        'http://www.data-science-jobs.com/',
    )

    def parse(self, response):
        pass

## Instruction:
Add more rules for test purposes.
## Code After:

from logging import getLogger
from scrapy.spiders import Rule, CrawlSpider
from scrapy.linkextractors import LinkExtractor


class DataScienceJobsSpider(CrawlSpider):
    log = getLogger(__name__)
    name = 'data-science-jobs'
    allowed_domains = ['www.data-science-jobs.com', 'fonts.googleapis.com', 'jobs.lever.com']
    start_urls = ['http://www.data-science-jobs.com/']
    test = Rule(LinkExtractor(allow='family'), callback='parse')
    test2 = Rule(LinkExtractor(allow='comtravo'), callback='parse')
    job_links = Rule(LinkExtractor(allow='detail\/'), callback='parse')
    pagination_links = Rule(LinkExtractor(allow='\?page=\d+'), callback='parse')
    rules = [job_links, pagination_links, test, test2]
    response = None

    def parse(self, response):
        self.log.info('Parsing %s', response.url)
