[facebook] Fix login process
It was broken and didn't work in python 3. And use `_download_webpage` instead of `compat_urllib_request.urlopen`.
This commit is contained in:
parent
94eae04c94
commit
b74fa8cd2c
3 changed files with 20 additions and 8 deletions
|
@ -33,6 +33,7 @@ from youtube_dl.utils import (
|
|||
unified_strdate,
|
||||
unsmuggle_url,
|
||||
url_basename,
|
||||
urlencode_postdata,
|
||||
xpath_with_ns,
|
||||
)
|
||||
|
||||
|
@ -261,5 +262,9 @@ class TestUtil(unittest.TestCase):
|
|||
bam''')
|
||||
self.assertEqual(read_batch_urls(f), [u'foo', u'bar', u'baz', u'bam'])
|
||||
|
||||
def test_urlencode_postdata(self):
|
||||
data = urlencode_postdata({'username': 'foo@bar.com', 'password': '1234'})
|
||||
self.assertTrue(isinstance(data, bytes))
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue