def parse_country_code(country_code):
    """
    Parse country code from URL to determine origin.
    :param country_code: country code from URL
    :return: parsed country code
    """
    cc = str(country_code).lower()
    if cc.lower() == 'edu' or cc.lower() == 'com' or cc.lower() == 'org' or cc.lower() == 'gov':
        return 'us'
    if cc.lower() == 'uk':
        return 'gb'
    return cc