diff options
author | scoder <stefan_ml@behnel.de> | 2017-02-11 21:47:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-11 21:47:35 +0100 |
commit | 6637e889d1e7b505c2e5fcc6194720c03076a08d (patch) | |
tree | 42a31e27cd7574d566e5e1baae5c1181182a36e6 | |
parent | eb347379bf1ceb79626af8decaafab877281558c (diff) | |
parent | 936852fc80e09622a7461d66bd6a46547dbb3eb5 (diff) | |
download | python-lxml-6637e889d1e7b505c2e5fcc6194720c03076a08d.tar.gz |
Merge pull request #222 from jwilk/post-form-submission
Fix POST form submission for Python 3
-rw-r--r-- | src/lxml/html/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lxml/html/__init__.py b/src/lxml/html/__init__.py index 525f9dc2..b0ab2c1e 100644 --- a/src/lxml/html/__init__.py +++ b/src/lxml/html/__init__.py @@ -1137,6 +1137,8 @@ def open_http_urllib(method, url, values): data = None else: data = urlencode(values) + if not isinstance(data, bytes): + data = data.encode('ASCII') return urlopen(url, data) |