<commit_before>import logging

import requests
import lxml.html

logger = logging.getLogger(__name__)

TITLES = (
    'dr.',
    'mr.',
    'ir.'
    'drs.',
    'bacc.',
    'kand.',
    'prof.',
    'ds.',
    'ing.',
    'bc.',
    'BA.',
    'BSc.',
    'LBB.',
    'LLM.',
    'MA.',
    'MSc.',
    'MPhil.',
    'PhD.',
)


def get_initials(parlement_and_politiek_id):
    url = 'https://www.parlement.com/id/' + parlement_and_politiek_id + '/'
    page = requests.get(url)
    tree = lxml.html.fromstring(page.content)
    title = tree.xpath("//title")[0].text
    name_parts = title.split(' ')  # this includes the title, if applicable, for example: <NAME>. (<NAME>
    initials = name_parts[0]<commit_msg>add missing comma in title list<commit_after>import logging

import requests
import lxml.html

logger = logging.getLogger(__name__)

TITLES = (
    'dr.',
    'mr.',
    'ir.',
    'drs.',
    'bacc.',
    'kand.',
    'prof.',
    'ds.',
    'ing.',
    'bc.',
    'BA.',
    'BSc.',
    'LBB.',
    'LLM.',
    'MA.',
    'MSc.',
    'MPhil.',
    'PhD.',
)


def get_initials(parlement_and_politiek_id):
    url = 'https://www.parlement.com/id/' + parlement_and_politiek_id + '/'
    page = requests.get(url)
    tree = lxml.html.fromstring(page.content)
    title = tree.xpath("//title")[0].text
    name_parts = title.split(' ')  # this includes the title, if applicable, for example: <NAME>. (<NAME>
    initials = name_parts[0]
{'fraction_non_alphanumeric': 0.19392684610075914, 'fraction_numerical': 0.0027605244996549345, 'mean_word_length': 2.485576923076923, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '4396053', 'n_tokens_mistral': 550, 'n_tokens_neox': 540, 'n_words': 108}