Fetch a header info from header tag in HTML file.
Project description
Overview
Fetch a header info from header tag in HTML file. This package is in development. It only correspond to title tag.
It returns a json object like this.
{
'status': '<status>',
'message': '<message>',
'title': '<title>',
'query': '<query>'
}
for example a successful case will be
{
'status': 'OK',
'message': 'fetching title success.',
'title': 'Example Domain',
'query': 'https://example.com'
}
and a bad case will be
{
'status': 'ERR',
'message': 'Invalid URL 'example.com': No schema supplied. Perhaps you meant http://example.com?',
'title': None,
'query': 'example.com'
}
The bad case returns an error code because the query is 'example.com', you should type 'https://example.com'.
Usage
from fetch_info import fetch_header
url = 'https://example.com'
fetch_header.fetch_title(url)
This software is released under the MIT License, see LICENSE.
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fetchhtmlinfo-0.0.6.tar.gz.
File metadata
- Download URL: fetchhtmlinfo-0.0.6.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d4b2a2927101a4aeff72df1b847e4ecb3813f82bc9c0586eda57259346e13eac
|
|
| MD5 |
b3230555797d1ed78c62c7abe535a012
|
|
| BLAKE2b-256 |
9e9f6db498d3e82adce2212236843b23d7367bd02174ca02fa5139bc91692f1d
|
File details
Details for the file fetchhtmlinfo-0.0.6-py3-none-any.whl.
File metadata
- Download URL: fetchhtmlinfo-0.0.6-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e07230d9add6682462c7af75d3653807662c6c166829046d31717f8e04880328
|
|
| MD5 |
a032224f208a99f0c906e178529a4797
|
|
| BLAKE2b-256 |
3e38cc73081fbd9697616051cfa4dc97623dbac1106bb4175a42806c5e1a91d0
|