Python parser for Apache/nginx-style HTML directory listing.
Project description
Python parser for Apache/nginx-style HTML directory listing
import htmllistparse
cwd, listing = htmllistparse.fetch_listing(some_url, timeout=30)
# or you can get the url and make a BeautifulSoup yourself, then use
# cwd, listing = htmllistparse.parse(soup)
where cwd is the current directory, listing is a list of FileEntry named tuples:
name: File name, str. Have a trailing / if it’s a directory.
modified: Last modification time, time.struct_time or None. Timezone is not known.
size: File size, int or None. May be estimated from the prefix, such as “K”, “M”.
description: File description, file type, or any other things found. str as HTML, or None.
Supports:
Vanilla Apache/nginx/lighttpd/darkhttpd autoindex
Most <pre>-style index
Many other <table>-style index
<ul>-style
ReHTTPFS
Reinvented HTTP Filesystem.
Mounts most HTTP file listings with FUSE.
Gets directory tree and file stats with less overhead.
Supports Range requests.
Supports Keep-Alive.
usage: rehttpfs.py [-h] [-o OPTIONS] [-t TIMEOUT] [-u USER_AGENT] [-v] [-d] url mountpoint Mount HTML directory listings. positional arguments: url URL to mount mountpoint filesystem mount point optional arguments: -h, --help show this help message and exit -o OPTIONS comma separated FUSE options -t TIMEOUT, --timeout TIMEOUT HTTP request timeout -u USER_AGENT, --user-agent USER_AGENT HTTP User-Agent -v, --verbose enable debug logging -d, --daemon run in background
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 htmllistparse-0.6.1.tar.gz
.
File metadata
- Download URL: htmllistparse-0.6.1.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6dc8a6bf03c843b9d325843a26a2351a795b573cd92a2c9b8271621019c64082 |
|
MD5 | 3e8ffe2e64318ad9c3875bf0678bc724 |
|
BLAKE2b-256 | 474f6c57a2817e4f20c1ed8dcca24ee036f981ed036f4b36d07a0100303db96a |
File details
Details for the file htmllistparse-0.6.1-py3-none-any.whl
.
File metadata
- Download URL: htmllistparse-0.6.1-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed027107de47bf18c7059db156075267947a828d3d72ab02823fbef0f39481a9 |
|
MD5 | 3c53716e6dd0068488763729014a6c40 |
|
BLAKE2b-256 | 43fbfed3185cb09dd7b7e06207a8b33767f1a3f9765e856394ad84b538a1b6ca |