[extractor/common] Allow empty post data

This commit is contained in:
Yen Chi Hsuan 2016-04-21 13:06:06 +08:00
parent 12a5134596
commit 2c0d9c6217
No known key found for this signature in database
GPG key ID: 3FDDD575826C5C30

View file

@ -382,7 +382,7 @@ def _request_webpage(self, url_or_request, video_id, note=None, errnote=None, fa
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)