hust-open-atom-club / linux-edu-rank

Linux 内核高校贡献排名榜
https://edurank.hust.openatom.club
BSD 2-Clause "Simplified" License
1 stars 4 forks source link

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

Open mudongliang opened 8 months ago

mudongliang commented 2 months ago
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