furl
furl copied to clipboard
🌐 URL parsing and manipulation made easy.
When urls (or parts thereof) are converted to a string, they're always escaped: ```python >>> url = furl('foo.bar/fire truck?hello world=#hi there') >>> str(url) 'foo.bar/fire%20truck?hello+world=#hi%20there' >>> str(url.path) 'foo.bar/fire%20truck' >>> str(url.query) 'hello+world='...
```python Python 3.9.13 (main, Jun 19 2022, 13:12:56) [GCC 9.4.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import furl >>> furl.furl('127.0.0.1:8329').url '8329' >>> from six.moves...
This idea has been floated in a [couple](https://github.com/gruns/furl/issues/112#issuecomment-462267721) of [comments](https://github.com/gruns/furl/issues/103#issuecomment-893146632) (thanks @pramttl and @fearless0307 !). I just thought it'd be worth creating a standalone issue for this idea and maybe...
Currently running mypy against something using this project gets ```error: Skipping analyzing 'furl': found module but no type hints or library stubs```
If `furl` were a `typing.Text`, it would work with static type checkers/hinters. I like that the following works: ```python url_obj = furl('http://www.google.com') response = requests.get(url_obj) ``` However, the static checker...
Hi, When I take a schemaless URL, and set a schema, the resulting string has an extra slash. ```python furl('www.example.com').set(scheme='http').tostr() ``` `'http:///www.example.com'` Is that by design? Can I get rid...
In [2]: u = furl("https://www.baidu.com/aaa") / "/bbbb/ccc" In [3]: u.url Out[3]: 'https://www.baidu.com/aaa/bbbb/ccc' In [4]: u = furl("https://www.baidu.com/aaa/") / "/bbbb/ccc" In [6]: u.url Out[6]: 'https://www.baidu.com/aaa//bbbb/ccc'
Hello, When playing with `file://`uris I found a weird behaviour related to `path` setter. ### Steps to reproduce ``` >>> x = furl('file:///a/b') >>> x.path Path('/a/b') >>> x.path.isabsolute # The...
ex: ```python >>> f = furl('https://www.google.com/hello') >>> f.copy().set(scheme=None, netloc=None).url '//:443/hello/' ``` vs ```python >>> f = furl('https://www.google.com/hello') >>> f.copy().set(scheme=None).set(netloc=None).url '/hello' ``` and oddity with `.set(scheme=None)` ``` >>> f = furl('https://www.google.com:999/hello')...