aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-03-07 15:25:33 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-03-07 15:25:33 +0100
commitb74fa8cd2c9deb412ac277c6cc44847c3839b844 (patch)
tree65d60faab0da7de5906edd2a623b3382a496a607 /youtube_dl/utils.py
parent94eae04c94a43847e8ce7c9bf3d88dd029ef62f6 (diff)
[facebook] Fix login process
It was broken and didn't work in python 3. And use `_download_webpage` instead of `compat_urllib_request.urlopen`.
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index 02b8f7c45..d4abd4031 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -1263,3 +1263,7 @@ def read_batch_urls(batch_fd):
with contextlib.closing(batch_fd) as fd:
return [url for url in map(fixup, fd) if url]
+
+
+def urlencode_postdata(*args, **kargs):
+ return compat_urllib_parse.urlencode(*args, **kargs).encode('ascii')