Q:

Using the "allow" keyword in Scrapy's LinkExtractor

I'm trying to scrape the website http://www.funda.nl/koop/amsterdam/, which lists houses for sale in Amsterdam.  The main page contains many links, some of which are links to individual houses for sale.  I would like to ultimately follow these links and extract data from them. 
To start off, I'm trying to simply list the links which correspond to individual houses.  I've noticed that their URLs contain "huis-" followed by an 8-digit code - for example, http://www.funda.nl/koop/amsterdam/huis-49801910-claus-van-amsbergstraat-86/. I'd like to match this subset of the URLs using the regular expression r'huis-\d{8}'. 
I'm trying to use Scrapy's LinkExtractor to do this, but it doesn't seem to be working.  The spider I've written is as follows:
import scrapy
from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
from Funda.items import FundaItem
from scrapy.shell import inspect_response

class FundaSpider(CrawlSpider):
    name = "Funda"
    allowed_domains = ["funda.nl"]
    start_urls = ["http://www.funda.nl/koop/amsterdam/"]

    le1 = LinkExtractor()
    rules = (
    Rule(LinkExtractor(allow=r'huis-\d{8}'), callback='parse_item'),
    )

    def parse_item(self, response):
        links = self.le1.extract_links(response)
        for link in links:
            item = FundaItem()
            item['url'] = link.url
            print("The item is "+str(item))
            yield item

In the main project directory, if I run scrapy crawl Funda -o funda.json, then the resulting funda.json file starts with the following lines:
[
{"url": "http://www.funda.nl/cookiebeleid/"},
{"url": "http://www.funda.nl/koop/amsterdam/huis-49728947-emmy-andriessestraat-374/ufsavqdqfvxyerrvff.html"},
{"url": "http://www.funda.nl/koop/amsterdam/huis-49728947-emmy-andriessestraat-374/"},
{"url": "http://www.funda.nl/koop/"},
{"url": "https://www.funda.nl/mijn/login/?ReturnUrl=%2Fkoop%2Famsterdam%2Fhuis-49728947-emmy-andriessestraat-374%2F"},
{"url": "https://www.funda.nl/mijn/aanmelden/?ReturnUrl=%2Fkoop%2Famsterdam%2Fhuis-49728947-emmy-andriessestraat-374%2F"},
{"url": "http://www.funda.nl/language/switchlanguage/?language=en&returnUrl=%2Fkoop%2Famsterdam%2Fhuis-49728947-emmy-andriessestraat-374%2F"},
{"url": "https://help.funda.nl/hc/nl/categories/200207038"},
{"url": "http://www.funda.nl/koop/amsterdam/"},

As you can see, it contains several lines with links without "huis-" or an 8-digit code in them.  How might I filter this down to only 'genuine' links to houses? 

A:

The problem was that the regular expression was in the definition of the rules parameter, but not in the definition of le1.  Adding it to the definition of le1 made the output as expected.