diff options
author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2022-11-09 18:05:59 +0900 |
---|---|---|
committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2022-11-09 18:05:59 +0900 |
commit | 5187250ba942d3c5100982d071332f5b4b561119 (patch) | |
tree | d74fe084074bc0c3c64dbe628512a2cd6839f1ca | |
parent | 0f62bd4871c66903744baea93f650923a0b40af0 (diff) | |
download | fead-5187250ba942d3c5100982d071332f5b4b561119.tar.gz |
Support URL query 0.1.2
-rwxr-xr-x | src/fead.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fead.py b/src/fead.py index 600dff0..ffe7b6f 100755 --- a/src/fead.py +++ b/src/fead.py @@ -151,7 +151,8 @@ async def fetch(raw_url): reader, writer = await open_connection(url.hostname, 80) else: raise ValueError(f'unsupported URL scheme: {url.scheme}') - writer.write(REQUEST.format(url.path or '/', url.hostname).encode()) + writer.write(REQUEST.format(f"{url.path or '/'}?{url.query}", + url.hostname).encode()) response = HTTPResponse(BytesSocket(await reader.read())) writer.close() |