semvec/pypi-packages huggingface dataset:
url-location 1.0.0b0
Package to retrieve the iso 3 short code of the country to which a URL belongs
License: MIT License
Keywords: url,country,url_location

# url_location

This library can be used to retrieve the country a URL belongs to by processing its domain.

## Usage

```python
from url_location import URLLocation

url = "https://www.exampleurl.com.ec/something-else"
ul = URLLocation()
country = ul.processUrl(url)
print(country)
```

Output
```console
ECU
```

When a URL can´t be processed the result will be <UNK> like bellow:

```python
url = "https://www.exampleurl.com/something-else"
ul = URLLocation()
country = ul.processUrl(url)
print(country)
```

Output
```console
None
```