import requests


def _article_search(company, start_day, end_day, base_url, nyt_key):
    """helper function to search for articles mentioning the company
    Args:
      company (string): the company name that should be mentioned
      start_day (datetime.date): the earliest publishing day of the articles
      end_day (datetime.date): the latest publishing day of the articles
    Returns:
      response: the json object storing the info about the articles and urls
    """
    url = (
        base_url
        + "q="
        + company
        + "&begin_date="
        + start_day
        + "&end_date="
        + end_day
        + "&fq=Financial"
        + "&fl=web_url"
        + "&api-key="
        + nyt_key
    )
    response = requests.get(url).json()
    return response