def _main_url(entry):
    """Get an entry's URL field (url or ee)."""
    urlfields = 'url', 'ee'
    for f in urlfields:
        if f in entry.fields:
            return entry.fields[f]
    return None
