Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The University of "cs.wisc.edu ssec.wisc.edu" is incorrect #1

Open
mudongliang opened this issue Feb 20, 2024 · 1 comment
Open

The University of "cs.wisc.edu ssec.wisc.edu" is incorrect #1

mudongliang opened this issue Feb 20, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@mudongliang
Copy link
Member

No description provided.

@mudongliang mudongliang added the bug Something isn't working label Feb 20, 2024
@mudongliang
Copy link
Member Author

def get_university(domain):
    for university in university_list:
        if domain in university["domains"]:
            return university

    for university in university_list:
        for raw_domain in university["domains"]:
            if domain.endswith(raw_domain) or raw_domain.endswith(domain):
                return university
    return None

The problem is in the above function - get_university. If the domain is sc.edu University of South Carolina, and the raw_domain is wisc.edu University of Wisconsin - Madison, it would return true in the comparison

@mudongliang mudongliang assigned mudongliang and unassigned AAtomical Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants