mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Initalize variable.
This commit is contained in:
parent
9f7eb04762
commit
6663715f75
@ -520,6 +520,7 @@ def get_download_filename(url, cookie_file=None):
|
|||||||
br.set_cookiejar(cj)
|
br.set_cookiejar(cj)
|
||||||
|
|
||||||
with closing(br.open(url)) as r:
|
with closing(br.open(url)) as r:
|
||||||
|
filename = ''
|
||||||
disposition = r.info().get('Content-disposition', '')
|
disposition = r.info().get('Content-disposition', '')
|
||||||
for p in disposition.split(';'):
|
for p in disposition.split(';'):
|
||||||
if 'filename' in p:
|
if 'filename' in p:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user