From 535bad2e89afeda12f5a353fbbbd0862f2bbfa19 Mon Sep 17 00:00:00 2001 From: garret Date: Wed, 12 Jul 2023 16:09:56 +0100 Subject: make paths work on linux --- walker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'walker.py') diff --git a/walker.py b/walker.py index 9ae6176..94d4786 100644 --- a/walker.py +++ b/walker.py @@ -44,7 +44,7 @@ def undrm(url, headers, cid_info): print('Page count: {}\n'.format(len(meta['data']['result']))) - save_path = os.path.join('downloaded_chapters\\{}\\{}'.format(cid_info['TITLE'], cid_info['CHAPTER'])) + save_path = os.path.join('downloaded_chapters/{}/{}'.format(cid_info['TITLE'], cid_info['CHAPTER'])) if not os.path.exists(save_path): os.makedirs(save_path) @@ -63,7 +63,7 @@ def undrm(url, headers, cid_info): enc = requests.get(meta['data']['result'][page-1]['meta']['source_url'], headers=headers).content pagination = str(page) + '.webp' - with open(f'{save_path}\\{pagination}', 'wb') as f: + with open(f'{save_path}/{pagination}', 'wb') as f: f.write(xor(enc, key)) logging.info('Done.') -- cgit v1.2.3-70-g09d2