From 93bb551bebca23eec010210bd55f3e174043f9c4 Mon Sep 17 00:00:00 2001 From: Bryan Bailey Date: Sun, 20 Mar 2022 21:42:19 -0400 Subject: [PATCH] requirements.txt cleanup --- requirements.txt | 1 - yoink/comic.py | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 31a5c29..3b75c44 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,7 +13,6 @@ pluggy==1.0.0 py==1.11.0 pyparsing==3.0.7 pytest==7.1.0 -qbittorrent-api==2022.2.28 requests==2.27.1 six==1.16.0 soupsieve==2.3.1 diff --git a/yoink/comic.py b/yoink/comic.py index 9f9f236..629b531 100644 --- a/yoink/comic.py +++ b/yoink/comic.py @@ -70,6 +70,7 @@ class Comic(Scrapable): @property def issue_number(self) -> int: + # maches any year in parentheses date_reg = re.search("(\([12]\d{3}\))", self.title) try: @@ -121,7 +122,6 @@ class ComicArchiver: opener = urllib.request.build_opener() opener.addheaders = [('User-Agent', 'Mozilla/5.0')] urllib.request.install_opener(opener) - print('\n') for index,url in enumerate(self.comic.filelist): @@ -148,6 +148,8 @@ class ComicArchiver: return output = shutil.make_archive(self.comic.title, 'zip', self.worktree, self.worktree) + # os.rename casuses OSError: [Errno 18] Invalid cross-device link and files build test + # os rename only works if src and dest are on the same file system shutil.move(output, os.path.join(self.worktree, f'{self.comic.title}{archive_format}'))