<commit_before>import scrapy
from jobs.items import JobsItem


class TvinnaSpider(scrapy.Spider):
    name = "tvinna"

    def start_requests(self):
        urls = [
            'http://www.tvinna.is/',
        ]
        for url in urls:
            yield scrapy.Request(url=url, callback=self.parse)

    def parse(self, response):
        for job in response.css('.job-listing li a'):
            item = JobsItem()
            item['title'] = job.css('a h2::text').extract_first(),
            item['company'] = job.css('a p::text').extract_first().strip(),
            item['url'] = job.css('a::attr(href)').extract_first(),
            item['posted'] = job.css('span.year::text').extract_first(),
            item['views'] = job.css('span.view-track::text').extract_first().strip()
            yield item<commit_msg>Add pagination support for tvinna.is<commit_after>import scrapy
from jobs.items import JobsItem


class TvinnaSpider(scrapy.Spider):
    name = "tvinna"

    def start_requests(self):
        urls = [
            'http://www.tvinna.is/',
        ]
        for url in urls:
            yield scrapy.Request(url=url, callback=self.parse)

    def parse(self, response):
        for job in response.css('.job-listing li a'):
            item = JobsItem()
            item['title'] = job.css('a h2::text').extract_first(),
            item['company'] = job.css('a p::text').extract_first().strip(),
            item['url'] = job.css('a::attr(href)').extract_first(),
            item['posted'] = job.css('span.year::text').extract_first(),
            item['views'] = job.css('span.view-track::text').extract_first().strip()
            yield item

        next_page = response.css('div.next-link a::attr(href)').extract_first()
        if next_page is not None:
            yield scrapy.Request(next_page, callback=self.parse)
{'fraction_non_alphanumeric': 0.16332067281606077, 'fraction_numerical': 0.0010851871947911015, 'mean_word_length': 2.4858223062381852, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1524417', 'n_tokens_mistral': 575, 'n_tokens_neox': 557, 'n_words': 106}