urlprofiler
urlprofiler fetches metadata about websites. For instance:
>>> from urlprofiler.profile.profile_url import profile_url
>>> metadata = profile_url("https://example.com")
>>> print(metadata)
{"url": "https://example.com", "was_redirected": True....}
urlprofiler makes it easy to access metadata about a URL, such as:
- HTTP status codes
- Connection latency
- SSL certificate information
- IP address of the hosting server
It can be imported as a Python package, or run directly on the command line using
urlprofiler <URL>. It can even take multiple URLs, and returns metadata in the order
the URLs are passed.
Installing urlprofiler
urlprofiler is available on PyPI:
$ python -m pip install urlprofiler
Officially urlprofiler runs on 3.7 and above. It was built on a macOS operating system and
has been tested on Linux. Don't forget to activate a virtual environment if you plan to use
urlprofiler within your own package:
$ python -m venv venv
Data points & best practices
- HTTP status with string translation e.g., 200, OK
- Redirection history for the given URL
- Connection latency (in seconds)
- Cookies returned by the HTTP connection
- SSL certificate data, including: -
- Issuer
- Expiry Date
- DNS names
- Organization details
- IP address of host server
To achieve reliable results, be sure to supply a full URL, includng protocol, domain name
and TLD. Please be aware that, if only a domain and TLD is supplied, urlprofiler will add
http to the beginning of the supplied string.
Cloning the repository and running the tests
You can clone the repository by using git clone followed by a link to this repository.
To run the tests, install pytest via $ pip install pytest in a virtual environment.
You can then run the tests with pytest -v. Alternatively, you can install tox with
pip install tox and run all associated tools (for code coverage, linting et al.) via $ tox.
Metadata
Release files for urlprofiler 1.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| urlprofiler-1.5.2.tar.gz | 8.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| urlprofiler-1.5.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.2 kB
Release files / urlprofiler-1.5.2.tar.gz
| Download URL | urlprofiler-1.5.2.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9501aed8a66248bf71ff3893094453e62be9bfa47234e411ee9da18cd9dd5dab
|
|
BLAKE2b-256 checksum How to use checksums |
a510b480d0cd7bb51380863c82b2a77cc50a65107f24d83853fbdcddf1af6887
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Release files / urlprofiler-1.5.2-py3-none-any.whl
| Download URL | urlprofiler-1.5.2-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d6cd4f67329e9803e7095a5990e7edd7758e72609af6668b7a4ced6b510a9918
|
|
BLAKE2b-256 checksum How to use checksums |
17898ccf803265c84c347211d7620ca623f3b81e476873d8cc352bd5b7c08d3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|