Created
December 1, 2019 20:02
-
-
Save NMZivkovic/01aeb61f5f33430ba37ede672aca7147 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scrapy | |
from ..items import ImageItem | |
class ImgSpider(scrapy.spiders.Spider): | |
name = "img_spider" | |
start_urls = ["https://rubikscode.net/"] | |
def parse(self, response): | |
image = ImageItem() | |
img_urls = [] | |
for img in response.css(".entry-featured-image-url img::attr(src)").extract(): | |
img_urls.append(img) | |
image["image_urls"] = img_urls | |
return image |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment