Skip to content

Commit

Permalink
moved ITEM_PIPELINE to custome_settings
Browse files Browse the repository at this point in the history
  • Loading branch information
FilipeOrfao committed Sep 4, 2024
1 parent 099175e commit fc2aeb5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion 022_/nobel_laureates/nobel_laureates/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

SPIDER_MODULES = ["nobel_laureates.spiders"]
NEWSPIDER_MODULE = "nobel_laureates.spiders"
ITEM_PIPELINES = {"scrapy.pipelines.images.ImagesPipeline": 1}
# ITEM_PIPELINES = {"scrapy.pipelines.images.ImagesPipeline": 1}

IMAGES_STORE = "images"

Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ class ListSpider(scrapy.Spider):
# allowed_domains = ["en.wikipedia.org"]
start_urls = ["http://en.wikipedia.org/wiki/List_of_Nobel_laureates_by_country"]

# custom_settings = {
# "ITEM_PIPELINES": {"nobel_laureates.pipelines.NobelImagesPipeline": 300},
# }
custom_settings = {
"ITEM_PIPELINES": {"scrapy.pipelines.images.ImagesPipeline": 300},
}

def parse(self, response):

countries = response.xpath("//h3")

for l in response.css("ol>li:has(>a)")[:10]:
for l in response.css("ol>li:has(>a)"):
# for l in response.css("ol>li:has(>a)"):
nwinner = NWinnerItem()

Expand Down

0 comments on commit fc2aeb5

Please sign in to comment.