<commit_before># -*- coding: utf-8 -*-

# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html

import scrapy


def single_item_serializer(value):
    # values are nested inside a list: (u'Viltu vaxa me\xf0 Alvogen?',)
    # so need to return just the fist value when serializing
    return value[0]


class JobsItem(scrapy.Item):
    title = scrapy.Field(serializer=single_item_serializer)
    company = scrapy.Field(serializer=single_item_serializer)
    url = scrapy.Field(serializer=single_item_serializer)
    posted = scrapy.Field(serializer=single_item_serializer)
    deadline = scrapy.Field(serializer=single_item_serializer)
    views = scrapy.Field(serializer=int)<commit_msg>Fix rendering of alfred.is data to json file<commit_after># -*- coding: utf-8 -*-

# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html

import scrapy


def single_item_serializer(value):
    # values are sometimes nested inside a list: (u'Viltu vaxa me\xf0 Alvogen?',)
    # so need to return just the fist value when serializing
    if isinstance(value, (list, tuple)):
        return value[0]
    return value


class JobsItem(scrapy.Item):
    title = scrapy.Field(serializer=single_item_serializer)
    company = scrapy.Field(serializer=single_item_serializer)
    url = scrapy.Field(serializer=single_item_serializer)
    posted = scrapy.Field(serializer=single_item_serializer)
    deadline = scrapy.Field(serializer=single_item_serializer)
    views = scrapy.Field(serializer=int)
{'fraction_non_alphanumeric': 0.09882643607164916, 'fraction_numerical': 0.0037059913526868438, 'mean_word_length': 4.5479452054794525, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '7204210', 'n_tokens_mistral': 526, 'n_tokens_neox': 516, 'n_words': 123}