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


class ComicData(ComicDataBase):
    name = '<NAME>'
    language = 'en'
    url = 'http://www.marriedtothesea.com/'
    start_date = '2006-02-13'
    rights = 'Drew'


class Crawler(CrawlerBase):
    history_capable_date = '2006-02-13'
    schedule = 'Mo,Tu,We,Th,Fr,Sa,Su'
    time_zone = 'US/Eastern'
    headers = {'User-Agent': 'Mozilla/4.0'}

    def crawl(self, pub_date):
        page_url = 'http://www.marriedtothesea.com/index.php?date=' + pub_date.strftime('%m%d%y')
        page = self.parse_page(page_url)
        url = page.src('img[style*="border:10px solid black"]')
        title = page.text('div[class="headertext"]', allow_multiple=True)
        title = title[0]
        title = title[title.find(':')+1:].strip()
        return CrawlerImage(url, title)<commit_msg>Nicer selector<commit_after>from comics.aggregator.crawler import CrawlerBase, CrawlerImage
from comics.core.comic_data import ComicDataBase


class ComicData(ComicDataBase):
    name = '<NAME>'
    language = 'en'
    url = 'http://www.marriedtothesea.com/'
    start_date = '2006-02-13'
    rights = 'Drew'


class Crawler(CrawlerBase):
    history_capable_date = '2006-02-13'
    schedule = 'Mo,Tu,We,Th,Fr,Sa,Su'
    time_zone = 'US/Eastern'
    headers = {'User-Agent': 'Mozilla/4.0'}

    def crawl(self, pub_date):
        page_url = 'http://www.marriedtothesea.com/index.php?date=' + pub_date.strftime('%m%d%y')
        page = self.parse_page(page_url)
        url = page.src('#butts img', allow_multiple=True)[0]
        title = page.text('div[class="headertext"]', allow_multiple=True)
        title = title[0]
        title = title[title.find(':')+1:].strip()
        return CrawlerImage(url, title)
{'fraction_non_alphanumeric': 0.15587266739846323, 'fraction_numerical': 0.023600439077936335, 'mean_word_length': 3.5575, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '2208648', 'n_tokens_mistral': 691, 'n_tokens_neox': 642, 'n_words': 108}