Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hazzik/publicsuffix
PublicSuffix - Highly optimized, very fast Domain Name parser using Mozilla's Public Suffix List (https://publicsuffix.org/)
https://github.com/hazzik/publicsuffix
c-sharp dotnet publicsuffix publicsuffixlist
Last synced: 2 months ago
JSON representation
PublicSuffix - Highly optimized, very fast Domain Name parser using Mozilla's Public Suffix List (https://publicsuffix.org/)
- Host: GitHub
- URL: https://github.com/hazzik/publicsuffix
- Owner: hazzik
- License: mit
- Created: 2014-12-23T11:17:25.000Z (about 10 years ago)
- Default Branch: main
- Last Pushed: 2024-04-24T22:41:15.000Z (8 months ago)
- Last Synced: 2024-05-12T15:22:19.599Z (8 months ago)
- Topics: c-sharp, dotnet, publicsuffix, publicsuffixlist
- Language: C#
- Homepage:
- Size: 547 KB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
PublicSuffix
============
PublicSuffix - Highly optimized Domain Name parser using Mozilla's Public Suffix List (https://publicsuffix.org/)Installation
============
Download the latest release from the [NuGet repository](https://www.nuget.org/packages/Brandy.PublicSuffix/)```PowerShell
Install-Package Brandy.PublicSuffix
```Examples
========
```csharp
var parser = DomainParser.Default; // Loads rules from https://publicsuffix.org/list/effective_tld_names.dat
var domain = parser.Parse("xxx.www.takahama.aichi.jp");Assert.IsTrue(domain.IsValid);
Assert.AreEqual("www.takahama.aichi.jp", domain.RegistrableDomain);
Assert.AreEqual("xxx", domain.Subdomain);
Assert.AreEqual("takahama.aichi.jp", domain.PublicSuffix);
```