<commit_before>from comics.crawler.base import BaseComicCrawler
from comics.crawler.meta import BaseComicMeta
from comics.crawler.utils.lxmlparser import LxmlParser

class ComicMeta(BaseComicMeta):
    name = '<NAME>'
    language = 'en'
    url = 'http://www.penny-arcade.com/'
    start_date = '1998-11-18'
    history_capable_date = '1998-11-18'
    schedule = 'Mo,We,Fr'
    rights = '<NAME> & <NAME>'

class ComicCrawler(BaseComicCrawler):
    def _get_url(self):
        self.web_url = 'http://www.penny-arcade.com/comic/%(date)s/' % {
            'date': self.pub_date.strftime('%Y/%m/%d'),
        }

        page = LxmlParser(self.web_url)

        self.title = page.text('div.simpleheader')
        self.url = page.src('img[alt="%s"]' % self.title)<commit_msg>Temporarily fix crash in Penny Arcade crawler<commit_after>from comics.crawler.base import BaseComicCrawler
from comics.crawler.meta import BaseComicMeta
from comics.crawler.utils.lxmlparser import LxmlParser

class ComicMeta(BaseComicMeta):
    name = '<NAME>'
    language = 'en'
    url = 'http://www.penny-arcade.com/'
    start_date = '1998-11-18'
    history_capable_date = '1998-11-18'
    schedule = 'Mo,We,Fr'
    rights = '<NAME> & <NAME>'

class ComicCrawler(BaseComicCrawler):
    def _get_url(self):
        self.web_url = 'http://www.penny-arcade.com/comic/%(date)s/' % {
            'date': self.pub_date.strftime('%Y/%m/%d'),
        }

        page = LxmlParser(self.web_url)

        # FIXME The decode() part should be handled by Base._get_url_post
        self.title = page.text('div.simpleheader').decode('iso-8859-1')
        self.url = page.src('img[alt="%s"]' % self.title)
{'fraction_non_alphanumeric': 0.15176964607078583, 'fraction_numerical': 0.022195560887822437, 'mean_word_length': 3.2015113350125946, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 6}, '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': '6598127', 'n_tokens_mistral': 636, 'n_tokens_neox': 595, 'n_words': 102}