All Projects β†’ Zensavona β†’ domainatrex

Zensavona / domainatrex

Licence: other
😈 A library for parsing TLDs from urls in Elixir

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to domainatrex

python-publicsuffix2
A small Python library to deal with publicsuffix data (includes a bundled PSL as "package data") in a wheel friendly format. Fork and continuation of TomaΕΎ Ε olc's "publicsuffix"
Stars: ✭ 18 (-37.93%)
Mutual labels:  tld, publicsuffix
sb-dynlex
Configurable lexer for PHP featuring a fluid API.
Stars: ✭ 27 (-6.9%)
Mutual labels:  parsing
ParsecSharp
The faster monadic parser combinator library for C#
Stars: ✭ 23 (-20.69%)
Mutual labels:  parsing
arborist
Arborist is a PEG parser that supports left-associative left recursion
Stars: ✭ 17 (-41.38%)
Mutual labels:  parsing
twitter-to-rss
Simple python script to parse twitter feed to generate a rss feed.
Stars: ✭ 15 (-48.28%)
Mutual labels:  parsing
FullFIX
A library for parsing FIX (Financial Information eXchange) protocol messages.
Stars: ✭ 60 (+106.9%)
Mutual labels:  parsing
metal
A Java library for parsing binary data formats, using declarative descriptions.
Stars: ✭ 13 (-55.17%)
Mutual labels:  parsing
puppeteer-autoscroll-down
Handle infinite scroll on websites by puppeteer
Stars: ✭ 40 (+37.93%)
Mutual labels:  parsing
logstash-config
logstash-config provides a parser and abstract syntax tree (AST) for the Logstash config format, written in Go
Stars: ✭ 26 (-10.34%)
Mutual labels:  parsing
pypact
A Python package for parsing FISPACT-II output
Stars: ✭ 19 (-34.48%)
Mutual labels:  parsing
parser-lang
A parser combinator library with declarative superpowers
Stars: ✭ 25 (-13.79%)
Mutual labels:  parsing
Ramble
A R parser based on combinatory parsers.
Stars: ✭ 19 (-34.48%)
Mutual labels:  parsing
biaffine-ner
Named Entity Recognition as Dependency Parsing
Stars: ✭ 293 (+910.34%)
Mutual labels:  parsing
pysub-parser
Library for extracting text and timestamps from multiple subtitle files (.ass, .ssa, .srt, .sub, .txt).
Stars: ✭ 40 (+37.93%)
Mutual labels:  parsing
attoparser
A tiny but fast java event-style markup parser.
Stars: ✭ 46 (+58.62%)
Mutual labels:  parsing
wasmbin
A self-generating WebAssembly parser & serializer in Rust.
Stars: ✭ 40 (+37.93%)
Mutual labels:  parsing
extract-emails
Extract emails from a given website
Stars: ✭ 58 (+100%)
Mutual labels:  parsing
php-fast-xml-parser
Fast SAX XML parser for PHP.
Stars: ✭ 25 (-13.79%)
Mutual labels:  parsing
YAPDFKit
Yet another PDF Kit for parsing and modifying PDF's. For OS X and iOS.
Stars: ✭ 27 (-6.9%)
Mutual labels:  parsing
homoglyphs
Homoglyphs: get similar letters, convert to ASCII, detect possible languages and UTF-8 group.
Stars: ✭ 70 (+141.38%)
Mutual labels:  domains

Domainatrex

Domainatrex is a TLD parsing library for Elixir, using the Public Suffix list.

Build Status Inline docs Coverage Status Deps Status hex.pm version hex.pm downloads License

Read the docs

Installation

Add the following to your mix.exs


defp deps do
  [{:domainatrex, "~> 2.2.0"}]

Usage

Domainatrex should be able to handle all valid hostnames, it uses the Public Suffix List and is heavily inspired by the fantastic Domainatrix library for Ruby

iex> Domainatrex.parse("someone.com")
{:ok, %{domain: "someone", subdomain: "", tld: "com"}}

iex> Domainatrex.parse("blog.someone.id.au")
{:ok, %{domain: "someone", subdomain: "blog", tld: "id.au"}}

Changelog

2.2.0

  • Use Logger for logging

2.1.4

  • Pin a version of nimble_parsec to fix a compilation error on makeup (makeup has fixed this downstream, so when ex_doc updates makeup, this will no longer be required)

2.1.3

  • Merge a couple of minor PRs

2.1.2

  • Improve tests and docs slightly

2.1.1

  • Privatise Domainatrex.match/n and Domainatrex.format_response/2 as they are only ever intended for internal use

2.1.0

  • Better handle private domains. Private domains like *.s3.amazonaws.com are technically classed as TLDs (to my understanding?), it doesn't make a lot of sense to parse them this way.
  • Fetch a new copy of the public suffix list from The Internet on compile, falling back to a (now updated!) local copy.

2.0.0

  • Change the API from returning explicit results to {:ok, result} or {:error, result}. This is to be more uniform with other libraries I use and for better with usage. Sorry if this fucks up your day.

1.0.1

  • Fully update the tests to reflect changes in 2.0.0 (thanks for the PR @pbonney!)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].