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

"""This script scrapes information about the student service office from the univaq website."""

import sys
sys.path.insert(0, '../')
from libs.utils import utils

student_office_url = "http://www.univaq.it/section.php?id=607"

def scrape_student_office(url=student_office_url):
    """Get info about the student service office"""

    first_row = utils.get_soup_from_url(url).find(string="AREA SCIENTIFICA")\
                .parent.parent.find_next_sibling().find("tr")

    address = first_row.find(class_="address_table_description").text
    phone = first_row.find_next_sibling().find(class_="address_table_description").text
    email = first_row.find_next_sibling().find_next_sibling()\
            .find(class_="address_table_description").text
    hours = first_row.find_next_sibling().find_next_sibling().find_next_sibling()\
            .find(class_="address_table_description").text.replace('\n', '')\
            .replace("13", "13, ")

    scraped_info = {
        "indirizzo": address,
        "telefono": phone,
        "e-mail": email,
        "orari": hours
    }<commit_msg>Linted code<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""This script scrapes information about the student service office from the univaq website."""

import sys
sys.path.insert(0, '../')
from libs.utils import utils

STUDENT_OFFICE_URL = "http://www.univaq.it/section.php?id=607"

def scrape_student_office(url=STUDENT_OFFICE_URL):
    """Get info about the student service office"""

    first_row = utils.get_soup_from_url(url).find(string="AREA SCIENTIFICA")\
                .parent.parent.find_next_sibling().find("tr")

    address = first_row.find(class_="address_table_description").text
    phone = first_row.find_next_sibling().find(class_="address_table_description").text
    email = first_row.find_next_sibling().find_next_sibling()\
            .find(class_="address_table_description").text
    hours = first_row.find_next_sibling().find_next_sibling().find_next_sibling()\
            .find(class_="address_table_description").text.replace('\n', '')\
            .replace("13", "13, ")

    scraped_info = {
        "indirizzo": address,
        "telefono": phone,
        "e-mail": email,
        "orari": hours
    }
{'fraction_non_alphanumeric': 0.14558058925476602, 'fraction_numerical': 0.00779896013864818, 'mean_word_length': 3.674089068825911, 'pattern_counts': {'":': 8, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '3181333', 'n_tokens_mistral': 769, 'n_tokens_neox': 761, 'n_words': 121}