encode the title before making a path
This commit is contained in:
parent
f405e1fb50
commit
aa98a92edb
@ -91,15 +91,15 @@ def download(phenny, input, verbose=True):
|
||||
|
||||
data = response.content
|
||||
|
||||
# grr..
|
||||
title = title.encode("ascii", "ignore")
|
||||
|
||||
path = os.path.join("/home/bryan/public_html/papers2/paperbot/", title + ".pdf")
|
||||
|
||||
file_handler = open(path, "w")
|
||||
file_handler.write(data)
|
||||
file_handler.close()
|
||||
|
||||
# grr..
|
||||
title = title.encode("ascii", "ignore")
|
||||
|
||||
filename = requests.utils.quote(title)
|
||||
url = "http://diyhpl.us/~bryan/papers2/paperbot/" + filename + ".pdf"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user