Fetches available metadata about a URL
Project description
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
.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file urlprofiler-1.5.2.tar.gz
.
File metadata
- Download URL: urlprofiler-1.5.2.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9501aed8a66248bf71ff3893094453e62be9bfa47234e411ee9da18cd9dd5dab |
|
MD5 | 2ddb1126ab4483bed30f44aa39f79542 |
|
BLAKE2b-256 | a510b480d0cd7bb51380863c82b2a77cc50a65107f24d83853fbdcddf1af6887 |
File details
Details for the file urlprofiler-1.5.2-py3-none-any.whl
.
File metadata
- Download URL: urlprofiler-1.5.2-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6cd4f67329e9803e7095a5990e7edd7758e72609af6668b7a4ced6b510a9918 |
|
MD5 | 276f357f4b9f8b07be3d15866cb4ada5 |
|
BLAKE2b-256 | 17898ccf803265c84c347211d7620ca623f3b81e476873d8cc352bd5b7c08d3b |