def semiannual_report_from(result, page_url, year_range):
    report_url = urljoin(page_url, result.select('a')[0].get('href'))
    report_filename = report_url.split('/')[(- 1)]
    (report_id, extension) = os.path.splitext(report_filename)
    date_range_text = result.select('td')[1].text
    title = 'Semiannual Report - {}'.format(date_range_text)
    published_on_text = date_range_text.split('-')[(- 1)].strip()
    published_on = datetime.datetime.strptime(published_on_text, '%B %d, %Y')
    report = {'inspector': 'education', 'inspector_url': 'https://www2.ed.gov/about/offices/list/oig/', 'agency': 'education', 'agency_name': 'Department of Education', 'report_id': report_id, 'url': report_url, 'title': title, 'published_on': datetime.datetime.strftime(published_on, '%Y-%m-%d')}
    return report
def semiannual_report_from(result, page_url, year_range):
    report_url = urljoin(page_url, result.select('a')[0].get('href'))
    report_filename = report_url.split('/')[(- 1)]
    (report_id, extension) = os.path.splitext(report_filename)
    date_range_text = result.select('td')[1].text
    title = 'Semiannual Report - {}'.format(date_range_text)
    published_on_text = date_range_text.split('-')[(- 1)].strip()
    published_on = datetime.datetime.strptime(published_on_text, '%B %d, %Y')
    report = {'inspector': 'education', 'inspector_url': 'https://www2.ed.gov/about/offices/list/oig/', 'agency': 'education', 'agency_name': 'Department of Education', 'report_id': report_id, 'url': report_url, 'title': title, 'published_on': datetime.datetime.strftime(published_on, '%Y-%m-%d')}
    return report