mirror of
https://github.com/soimort/you-get.git
synced 2025-03-13 03:17:44 +03:00
fix #106
This commit is contained in:
parent
106c85e2e5
commit
0967d731af
@ -133,11 +133,14 @@ def url_info(url, faker = False):
|
||||
ext = mapping[type]
|
||||
else:
|
||||
type = None
|
||||
if headers['content-disposition']:
|
||||
filename = parse.unquote(r1(r'filename="?(.+)"?', headers['content-disposition']))
|
||||
if len(filename.split('.')) > 1:
|
||||
ext = filename.split('.')[-1]
|
||||
else:
|
||||
ext = None
|
||||
else:
|
||||
ext = None
|
||||
|
||||
if headers['transfer-encoding'] != 'chunked':
|
||||
size = int(headers['content-length'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user