<commit_before>import re
import json
import certifi
import hashlib
import requests


#from lxml import html
from datetime import date, datetime
from requests.adapters import HTTPAdapter
from urlparse import urlsplit, urlunsplit, urljoin
from juriscraper.lib.test_utils import MockRequest
from juriscraper.lib.html_utils import get_html_parsed_text
from juriscraper.lib.date_utils import json_date_handler, fix_future_year_typo
from juriscraper.lib.log_tools import make_default_logger
from juriscraper.lib.string_utils import (
    harmonize, clean_string, trunc, CaseNameTweaker
)

try:
    # Use cchardet for performance to detect the character encoding.
    import cchardet as chardet
except ImportError:
    import chardet

logger = make_default_logger()

class InsanityException(Exception):
    def __init__(self, message):
        Exception.__init__(self, message)


class AbstractSite(object):
    """Contains generic methods for scraping data. Should be extended by all
    scrapers.<commit_msg>Removing commented line leftover from previous commit.<commit_after>import re
import json
import certifi
import hashlib
import requests


from datetime import date, datetime
from requests.adapters import HTTPAdapter
from urlparse import urlsplit, urlunsplit, urljoin
from juriscraper.lib.test_utils import MockRequest
from juriscraper.lib.html_utils import get_html_parsed_text
from juriscraper.lib.date_utils import json_date_handler, fix_future_year_typo
from juriscraper.lib.log_tools import make_default_logger
from juriscraper.lib.string_utils import (
    harmonize, clean_string, trunc, CaseNameTweaker
)

try:
    # Use cchardet for performance to detect the character encoding.
    import cchardet as chardet
except ImportError:
    import chardet

logger = make_default_logger()

class InsanityException(Exception):
    def __init__(self, message):
        Exception.__init__(self, message)


class AbstractSite(object):
    """Contains generic methods for scraping data. Should be extended by all
    scrapers.
{'fraction_non_alphanumeric': 0.04940711462450593, 'fraction_numerical': 0.0, 'mean_word_length': 5.449044585987261, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '4709893', 'n_tokens_mistral': 579, 'n_tokens_neox': 570, 'n_words': 189}