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

ExtractDomains returns non-Apex Domains #519

Closed
ruebot opened this issue Oct 4, 2021 · 2 comments · Fixed by #520
Closed

ExtractDomains returns non-Apex Domains #519

ruebot opened this issue Oct 4, 2021 · 2 comments · Fixed by #520
Assignees
Labels

Comments

@ruebot
Copy link
Member

ruebot commented Oct 4, 2021

Not 100% sure this is the intention of ExtractDomain since it was implemented before my time, but I'm inclined to believe that it should return the domain apex, instead of sub-domains.

So, aut.doc.archivesunleashed.org and news.archivesunleashed.org should all be returned as archivesunleashed.org.

If non-apex domains were the original intention, let me know @lintool @ianmilligan1.

@ruebot ruebot added the bug label Oct 4, 2021
@ruebot ruebot self-assigned this Oct 4, 2021
ruebot added a commit that referenced this issue Oct 4, 2021
- Resolves #519
- Add scala-uri as a dependency
- Replace getHost method of extracting domains with apexDomain from scala-uri
- Update tests as needed
- Removed unused source parameter from ExtractDomain
@lintool
Copy link
Member

lintool commented Oct 4, 2021

So, aut.doc.archivesunleashed.org and news.archivesunleashed.org should all be returned as archivesunleashed.org.

Yes, that is the desired behavior.

@ianmilligan1
Copy link
Member

So, aut.doc.archivesunleashed.org and news.archivesunleashed.org should all be returned as archivesunleashed.org.

+1 as well. Thanks @ruebot !

ruebot added a commit that referenced this issue Oct 21, 2021
- Resolves #519
- Add scala-uri as a dependency
- Replace getHost method of extracting domains with apexDomain from scala-uri
- Update tests as needed
- Removed unused source parameter from ExtractDomain
- Shade cats
- catch Url.parse exceptions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants