cs.urlutils 20231129

Creator: bradpython12

Last updated:

0 purchases

TODO
Add to Cart

Description:

cs.urlutils 20231129

URL related utility functions and classes.

Cameron Simpson cs@cskk.id.au 26dec2011


Latest release 20231129:

Drop Python 2 support.
No longer use cs.xml, which is going away.
Make _URL type public as URL with a new promote() method, drop URL factory function, update URL constructors throughout.
URL.init: make parameters keyword only.

Class NetrcHTTPPasswordMgr(urllib.request.HTTPPasswordMgrWithDefaultRealm, urllib.request.HTTPPasswordMgr)
A subclass of HTTPPasswordMgrWithDefaultRealm that consults
the .netrc file if no overriding credentials have been stored.
Function skip_errs(iterable)
Iterate over iterable and yield its values.
If it raises URLError or HTTPError, report the error and skip the result.
Function strip_whitespace(s)
Strip whitespace characters from a string, per HTML 4.01 section 1.6 and appendix E.
Class URL(builtins.str, cs.deco.Promotable)
Utility class to do simple stuff to URLs, subclasses str.
Release Log
Release 20231129:

Drop Python 2 support.
No longer use cs.xml, which is going away.
Make _URL type public as URL with a new promote() method, drop URL factory function, update URL constructors throughout.
URL.init: make parameters keyword only.

Release 20191004:
Small updates for changes to other modules.
Release 20160828:
Use "install_requires" instead of "requires" in DISTINFO.
Release 20160827:

Handle TimeoutError, reporting elapsed time.
URL: present ._fetch as .GET.
URL: add .resolve to resolve this URL against a base URL.
URL: add .savepath and .unsavepath methods to generate nonconflicting save pathnames for URLs and the reverse.
URL._fetch: record the post-redirection URL as final_url.
New URLLimit class for specifying simple tests for URL acceptance.
New walk(): method to walk website from starting URL, yielding URLs.
URL.content_length property, returns int or None if header missing.
New URL.normalised method to return URL with . and .. processed in the path.
new URL.exists test function.
Assorted bugfixes and improvements.

Release 20150116:
Initial PyPI release.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.