[extractor/common] Allow empty post data
authorYen Chi Hsuan <yan12125@gmail.com>
Thu, 21 Apr 2016 05:06:06 +0000 (13:06 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Thu, 21 Apr 2016 05:06:06 +0000 (13:06 +0800)
youtube_dl/extractor/common.py

index 5269059d0d9e080a2e3650f7ce30a8e8d3422d96..02cd2c003ce0ab7b305d67e4f0e9c61304795620 100644 (file)
@@ -382,7 +382,7 @@ class InfoExtractor(object):
         else:
             if query:
                 url_or_request = update_url_query(url_or_request, query)
-            if data or headers:
+            if data is not None or headers:
                 url_or_request = sanitized_Request(url_or_request, data, headers)
         try:
             return self._downloader.urlopen(url_or_request)