diff --git a/txtDownloader.ipynb b/txtDownloader.ipynb index 7039e217b6cc3f6481a4908105dd80f28f2120cb..16270032a417785cdb950d92917340def3e4599e 100644 --- a/txtDownloader.ipynb +++ b/txtDownloader.ipynb @@ -107,9 +107,8 @@ "\n", "for page in data[\"sequences\"][0][\"canvases\"]:\n", " txt_url = page[\"otherContent\"][0][\"resources\"][0][\"resource\"][\"@id\"]\n", - " i=i+1\n", " print(\"downloading \" + txt_url)\n", - " output_file = str(i) + \".txt\"\n", + " output_file = str(txt_url.split('/')[-1])\n", " with urllib.request.urlopen(txt_url) as response, open(output_file, \"wb\") as out_file:\n", " shutil.copyfileobj(response, out_file)\n", " zipObj.write(os.path.abspath(output_file),output_file)\n", @@ -153,4 +152,4 @@ }, "nbformat": 4, "nbformat_minor": 2 -} \ No newline at end of file +}