scraper/doecode/__init__.py
def process_url(url, key):
    """
    Yields DOE CODE records from a DOE CODE .json URL response
    Converts a DOE CODE API .json URL response into DOE CODE projects
    """

    logger.debug('Fetching DOE CODE JSON: %s', url)

    if key is None:
        raise ValueError('DOE CODE API Key value is missing!')

    response = requests.get(url, headers={"Authorization": "Basic " + key})
    doecode_json = response.json()

    for record in doecode_json['records']:
        yield record
def process_url(url, key):
    """
    Yields DOE CODE records from a DOE CODE .json URL response
    Converts a DOE CODE API .json URL response into DOE CODE projects
    """

    logger.debug('Fetching DOE CODE JSON: %s', url)

    if key is None:
        raise ValueError('DOE CODE API Key value is missing!')

    response = requests.get(url, headers={"Authorization": "Basic " + key})
    doecode_json = response.json()

    for record in doecode_json['records']:
        yield record
Yields DOE CODE records from a DOE CODE .json URL response
    Converts a DOE CODE API .json URL response into DOE CODE projects