コード例 #1
0
    def parse_item(self, response):
        raw_recipes = parse_recipes(response, {
            'source': self.source,
            'url': response.url
        })

        return [RecipeItem.from_dict(recipe) for recipe in raw_recipes]
コード例 #2
0
ファイル: food_spider.py プロジェクト: rkroll/openrecipes
    def parse_item(self, response):
        # skip review pages, which are hard to distinguish from recipe pages
        # in the link extractor regex
        if response.url.endswith('/review'):
            return []

        raw_recipes = parse_recipes(response, {u'source': self.source, 'url': response.url})

        return [RecipeItem.from_dict(recipe) for recipe in raw_recipes]
コード例 #3
0
ファイル: food_spider.py プロジェクト: rkroll/openrecipes
    def parse_item(self, response):
        # skip review pages, which are hard to distinguish from recipe pages
        # in the link extractor regex
        if response.url.endswith('/review'):
            return []

        raw_recipes = parse_recipes(response, {
            u'source': self.source,
            'url': response.url
        })

        return [RecipeItem.from_dict(recipe) for recipe in raw_recipes]
コード例 #4
0
 def parse_item(self, response):
   raw_recipes = parse_recipes(response, {'source': self.source, 'url': response.url})
   return [RecipeItem.from_dict(recipe) for recipe in raw_recipes]