<commit_before># encoding: utf-8

from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase


class ComicData(ComicDataBase):
    name = 'Optipess'
    language = 'en'
    url = 'http://www.optipess.com/'
    start_date = '2008-12-01'
    rights = 'Kristian Nygård'


class Crawler(CrawlerBase):
    history_capable_days = 90
    schedule = 'Th,Su'
    time_zone = 'Europe/Oslo'

    def crawl(self, pub_date):
        feed = self.parse_feed(
            'http://feeds.feedburner.com/Optipess?format=xml')
        for entry in feed.for_date(pub_date):
            url = entry.summary.src('img[src*="/comics/"]')
            title = entry.title
            return CrawlerImage(url, title)<commit_msg>Minor tweaks to 'optipess' crawler<commit_after># encoding: utf-8

from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase


class ComicData(ComicDataBase):
    name = 'Optipess'
    language = 'en'
    url = 'http://www.optipess.com/'
    start_date = '2008-12-01'
    rights = 'Kristian Nygård'


class Crawler(CrawlerBase):
    history_capable_days = 90
    schedule = 'Th,Su'
    time_zone = 'Europe/Oslo'

    def crawl(self, pub_date):
        feed = self.parse_feed('http://feeds.feedburner.com/Optipess')
        for entry in feed.for_date(pub_date):
            if 'Comic' not in entry.tags:
                continue
            url = entry.summary.src('img[src*="/comics/"]')
            title = entry.title
            return CrawlerImage(url, title)
{'fraction_non_alphanumeric': 0.1183206106870229, 'fraction_numerical': 0.013994910941475827, 'mean_word_length': 2.845965770171149, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 1}, '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': '6782251', 'n_tokens_mistral': 560, 'n_tokens_neox': 525, 'n_words': 108}