import scrapy from crossweb.items import CrosswebItem class ResearchSpider(scrapy.Spider): start_urls = [ 'https://crossweb.pl/job/', 'https://crossweb.pl/job/?page=2' ] name = 'crossweb' def parse(self, response): for talk in response.css('.company a'): href = talk.css('a::attr(href)').extract_first() full_url = response.urljoin(href) yield scrapy.Request(full_url, callback=self.parse_book) def parse_book(self, response): name = response.css('#container > h1::text').extract_first() city = response.css('#content > section:nth-child(3) > div.param > div:nth-child(1) > span::text').extract_first() description = response.css('#eventText > p::text').extract_first() topics = response.css('#content > section:nth-child(5) > div.param > div:nth-child(1) > span::text').extract() file_urls = response.css('#container > div.company-photo > img:nth-child(2)::attr(src)').extract_first() yield CrosswebItem(name=name, city=city, description=description, topics=topics,file_urls=file_urls)