<commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import datetime
import re
from typing import Any, Dict, Generator

import lxml.html

from venues.abstract_venue import AbstractVenue


class Telakka(AbstractVenue):
    def __init__(self):
        super().__init__()
        self.url = "http://www.telakka.eu/ravintola/ohjelma"
        self.name = "Telakka"
        self.city = "Tampere"
        self.country = "Finland"

        # Parsing patterns
        self.pat_date = re.compile("[0-9]+.[0-9]+.")
        self.monetary = re.compile("[0-9,]+[ ]?€")

    def parse_price(self, elem: str) -> str:
        if elem == '':
            return '0 €'

        prices = re.search(self.monetary, elem)
        if prices is None:
            return "0 €"
        return "".join(prices.group())

    def parse_date(self, elem: lxml.html.HtmlElement):
        date_now = datetime.datetime.now()
<commit_msg>Default price parser does it's job.<commit_after>#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import datetime
import re
from typing import Any, Dict, Generator

import lxml.html

from venues.abstract_venue import AbstractVenue


class Telakka(AbstractVenue):
    def __init__(self):
        super().__init__()
        self.url = "http://www.telakka.eu/ravintola/ohjelma"
        self.name = "Telakka"
        self.city = "Tampere"
        self.country = "Finland"

        # Parsing patterns
        self.pat_date = re.compile("[0-9]+.[0-9]+.")

    def parse_date(self, elem: lxml.html.HtmlElement):
        date_now = datetime.datetime.now()

{'fraction_non_alphanumeric': 0.14193962748876043, 'fraction_numerical': 0.010276172125883108, 'mean_word_length': 2.5328798185941044, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, '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': '7453865', 'n_tokens_mistral': 530, 'n_tokens_neox': 516, 'n_words': 116}